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.
This commit is contained in:
Peter Eisentraut 2018-03-24 15:38:57 -04:00
parent c92f7c6223
commit 4644a1170f

View File

@ -62,7 +62,7 @@ PostgreSQL documentation
values will be substituted for the missing data. Most of the fields can be 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, expected to match, but manual assistance might be needed for the next OID,
next transaction ID and epoch, next multitransaction ID and offset, and 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 discussed below. If you are not able to determine correct values for all
these fields, <option>-f</option> can still be used, but these fields, <option>-f</option> can still be used, but
the recovered database must be treated with even more suspicion than the recovered database must be treated with even more suspicion than
@ -167,11 +167,12 @@ PostgreSQL documentation
<term><option>-l</option> <replaceable class="parameter">walfile</replaceable></term> <term><option>-l</option> <replaceable class="parameter">walfile</replaceable></term>
<listitem> <listitem>
<para> <para>
Manually set the WAL starting address. Manually set the WAL starting location by specifying the name of the
next WAL segment file.
</para> </para>
<para> <para>
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 larger than any WAL segment file name currently existing in
the directory <filename>pg_wal</filename> under the data directory. the directory <filename>pg_wal</filename> under the data directory.
These names are also in hexadecimal and have three parts. The first These names are also in hexadecimal and have three parts. The first
@ -180,6 +181,13 @@ PostgreSQL documentation
largest entry in <filename>pg_wal</filename>, use <literal>-l 00000001000000320000004B</literal> or higher. largest entry in <filename>pg_wal</filename>, use <literal>-l 00000001000000320000004B</literal> or higher.
</para> </para>
<para>
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.
</para>
<note> <note>
<para> <para>
<command>pg_resetwal</command> itself looks at the files in <command>pg_resetwal</command> itself looks at the files in