If pg_resetxlog complains that it cannot determine
valid data for pg_control>, you can force it to proceed anyway
- by specifying the <literal>-f> (force) switch. In this case plausible
+ by specifying the <option>-f> (force) option. In this case plausible
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 switches
+ WAL starting address fields. These fields can be set using the options
discussed below. If you are not able to determine correct values for all
- these fields, <literal>-f> can still be used, but
+ these fields, <option>-f> can still be used, but
the recovered database must be treated with even more suspicion than
usual: an immediate dump and reload is imperative. Do not>
execute any data-modifying operations in the database before you dump,
- The <literal>-o>, -x>, >-e>,
- <literal>-m>, >-O>,
- and <literal>-l>
- switches allow the next OID, next transaction ID, next transaction ID's
+ The <option>-o>,
+ <option>-m>,
+ and <option>-l>
+ options allow the next OID, next transaction ID, next transaction ID's
epoch, next multitransaction ID, next multitransaction offset, and WAL
starting address values to be set manually. These are only needed when
pg_resetxlog is unable to determine appropriate values
- A safe value for the next transaction ID (<literal>-x>)
+ A safe value for the next transaction ID (<option>-x>)
can be determined by looking for the numerically largest
file name in the directory pg_clog> under the data directory,
adding one,
and then multiplying by 1048576. Note that the file names are in
- hexadecimal. It is usually easiest to specify the switch value in
+ hexadecimal. It is usually easiest to specify the option value in
hexadecimal too. For example, if 0011> is the largest entry
in pg_clog>, -x 0x1200000> will work (five
trailing zeroes provide the proper multiplier).
- A safe value for the next multitransaction ID (<literal>-m>)
+ A safe value for the next multitransaction ID (<option>-m>)
can be determined by looking for the numerically largest
file name in the directory pg_multixact/offsets> under the
data directory, adding one, and then multiplying by 65536. As above,
the file names are in hexadecimal, so the easiest way to do this is to
- specify the switch value in hexadecimal and add four zeroes.
+ specify the option value in hexadecimal and add four zeroes.
- A safe value for the next multitransaction offset (<literal>-O>)
+ A safe value for the next multitransaction offset (<option>-O>)
can be determined by looking for the numerically largest
file name in the directory pg_multixact/members> under the
data directory, adding one, and then multiplying by 65536. As above,
the file names are in hexadecimal, so the easiest way to do this is to
- specify the switch value in hexadecimal and add four zeroes.
+ specify the option value in hexadecimal and add four zeroes.
- The WAL starting address (<literal>-l>) should be
+ The WAL starting address (<option>-l>) should be
larger than any WAL segment file name currently existing in
the directory pg_xlog> under the data directory.
These names are also in hexadecimal and have three parts. The first
pg_resetxlog itself looks at the files in
- pg_xlog> and chooses a default <literal>-l> setting
+ pg_xlog> and chooses a default <option>-l> setting
beyond the last existing file name. Therefore, manual adjustment of
- <literal>-l> should only be needed if you are aware of WAL segment
+ <option>-l> should only be needed if you are aware of WAL segment
files that are not currently present in pg_xlog>, such as
entries in an offline archive; or if the contents of
pg_xlog> have been lost entirely.
- The <literal>-n> (no operation) switch instructs
+ The <option>-n> (no operation) option instructs
pg_resetxlog to print the values reconstructed from
pg_control> and then exit without modifying anything.
This is mainly a debugging tool, but can be useful as a sanity check
- The <literal>-V> and >--version> options print
+ The <option>-V> and
the
pg_resetxlog version and exit. The
- options <literal>-?> and >--help> show supported arguments,
+ options <option>-?> and
and exit.