From 62f7c173bbd8d81dc932c7041c787c1931e89806 Mon Sep 17 00:00:00 2001 From: Bharath Rupireddy Date: Sun, 17 Apr 2022 08:39:41 +0000 Subject: [PATCH v1] pg_walcleaner docs --- doc/src/sgml/ref/allfiles.sgml | 1 + doc/src/sgml/ref/pgwalcleaner.sgml | 159 +++++++++++++++++++++++++++++ doc/src/sgml/reference.sgml | 1 + 3 files changed, 161 insertions(+) create mode 100644 doc/src/sgml/ref/pgwalcleaner.sgml diff --git a/doc/src/sgml/ref/allfiles.sgml b/doc/src/sgml/ref/allfiles.sgml index e90a0e1f83..11eddc91a4 100644 --- a/doc/src/sgml/ref/allfiles.sgml +++ b/doc/src/sgml/ref/allfiles.sgml @@ -217,6 +217,7 @@ Complete list of usable sgml source files in this directory. + diff --git a/doc/src/sgml/ref/pgwalcleaner.sgml b/doc/src/sgml/ref/pgwalcleaner.sgml new file mode 100644 index 0000000000..cd8a8610ef --- /dev/null +++ b/doc/src/sgml/ref/pgwalcleaner.sgml @@ -0,0 +1,159 @@ + + + + + pg_walcleaner + + + + pg_walcleaner + 1 + Application + + + + pg_walcleaner + delete (optionally archive before deletion) unneeded PostgreSQL WAL files + + + + + pg_walcleaner + option + + + + + Description + + + pg_walcleaner is a standalone program to delete + WAL files that are not needed by PostgreSQL server any more. It is designed + to be used on a PostgreSQL server that is crashed/down because of out of disk + space. It helps free up some disk space to bring back the server. It can also + optionally archive WAL files before deletion. It keeps checkpoint's REDO WAL + file and all the WAL files present after that. It also keeps the WAL files + required for all replication slots, if present. It also keeps the WAL files + that are yet to be archived by the PostgreSQL server i.e. the ones having + .ready files. + + + + + Options + + + pg_walcleaner accepts the following command-line arguments: + + + + + + + + + Archive WAL files before deletion using + archive_command. The command must be similar + to PostgreSQL server's + configuration parameter. When specified, it archives the WAL file(s) + irrespective of whether the PostgreSQL server is yet to archive (.ready + files present) or has already archived (.done files present). + + + + + + + + + + PostgreSQL's data directory. If not specified, the environment variable + PGDATA is used. + + + + + + + + + + Print the names of the files that would have been removed on stdout (performs a dry run). + + + + + + + + + + Ignores replication slots while calculating the cut off WAL file i.e. + oldest WAL file before which all the WAL files will be removed. In + other words, if specified, pg_walcleaner + doesn't keep WAL files required by all the replication slots. + + + + + + + + + + Print detailed information during processing. + + + + + + + + + + Print the pg_walcleaner version and exit. + + + + + + + + + + Show help about pg_walcleaner command line + arguments, and exit. + + + + + + + + + Environment + + + The environment variable PG_COLOR specifies whether to use + color in diagnostic messages. Possible values are + always, auto and + never. + + + + + + Notes + + + pg_walcleaner is designed to be used on a crashed + server to free up some disk space. If used on a running server, it might + interfere with checkpoint which also deletes the old WAL files. Hence it is + advised to use it carefully. + + + + diff --git a/doc/src/sgml/reference.sgml b/doc/src/sgml/reference.sgml index a3b743e8c1..64f43fc14a 100644 --- a/doc/src/sgml/reference.sgml +++ b/doc/src/sgml/reference.sgml @@ -287,6 +287,7 @@ &pgtestfsync; &pgtesttiming; &pgupgrade; + &pgwalcleaner; &pgwaldump; &postgres; &postmaster; -- 2.25.1