From 4644a1170f0ad88f92d2835f589fffb6aa38c129 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Sat, 24 Mar 2018 15:38:57 -0400 Subject: [PATCH] Improve pg_resetwal documentation Clarify that the -l option takes a file name, not an "address", and that that might be different from the LSN if nondefault WAL segment sizes are used. --- doc/src/sgml/ref/pg_resetwal.sgml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/doc/src/sgml/ref/pg_resetwal.sgml b/doc/src/sgml/ref/pg_resetwal.sgml index 43b58a49e6..34ebe11a44 100644 --- a/doc/src/sgml/ref/pg_resetwal.sgml +++ b/doc/src/sgml/ref/pg_resetwal.sgml @@ -62,7 +62,7 @@ PostgreSQL documentation values will be substituted for the missing data. Most of the fields can be expected to match, but manual assistance might be needed for the next OID, next transaction ID and epoch, next multitransaction ID and offset, and - WAL starting address fields. These fields can be set using the options + WAL starting location fields. These fields can be set using the options discussed below. If you are not able to determine correct values for all these fields, can still be used, but the recovered database must be treated with even more suspicion than @@ -167,11 +167,12 @@ PostgreSQL documentation walfile - Manually set the WAL starting address. + Manually set the WAL starting location by specifying the name of the + next WAL segment file. - The WAL starting address should be + The name of next WAL segment file should be larger than any WAL segment file name currently existing in the directory pg_wal under the data directory. These names are also in hexadecimal and have three parts. The first @@ -180,6 +181,13 @@ PostgreSQL documentation largest entry in pg_wal, use -l 00000001000000320000004B or higher. + + Note that when using nondefault WAL segment sizes, the numbers in the WAL + file names are different from the LSNs that are reported by system + functions and system views. This option takes a WAL file name, not an + LSN. + + pg_resetwal itself looks at the files in -- 2.40.0