diff options
author | Bruce Momjian <bruce@momjian.us> | 2006-04-26 02:17:15 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2006-04-26 02:17:15 +0000 |
commit | 0df32e3cbef991f2fcec6498ff882d8172a35d28 (patch) | |
tree | 4bd803d6737495b766f0458cc950b3f534a71741 /doc/src | |
parent | 3289a932a95667df9ec982135e42bd4d28d7897d (diff) | |
download | postgresql-0df32e3cbef991f2fcec6498ff882d8172a35d28.tar.gz postgresql-0df32e3cbef991f2fcec6498ff882d8172a35d28.zip |
Allow pg_resetxlog -f to reset pg_control counters using xlog
information, and add a -r option to reset pg_control without affecting
xlog.
yuanjia lee
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/ref/pg_resetxlog.sgml | 38 |
1 files changed, 22 insertions, 16 deletions
diff --git a/doc/src/sgml/ref/pg_resetxlog.sgml b/doc/src/sgml/ref/pg_resetxlog.sgml index 7586837c079..2a8a702dedc 100644 --- a/doc/src/sgml/ref/pg_resetxlog.sgml +++ b/doc/src/sgml/ref/pg_resetxlog.sgml @@ -1,5 +1,5 @@ <!-- -$PostgreSQL: pgsql/doc/src/sgml/ref/pg_resetxlog.sgml,v 1.13 2006/04/25 21:02:33 momjian Exp $ +$PostgreSQL: pgsql/doc/src/sgml/ref/pg_resetxlog.sgml,v 1.14 2006/04/26 02:17:15 momjian Exp $ PostgreSQL documentation --> @@ -20,6 +20,7 @@ PostgreSQL documentation <command>pg_resetxlog</command> <arg>-f</arg> <arg>-n</arg> + <arg>-r</arg> <arg>-o<replaceable class="parameter">oid</replaceable> </arg> <arg>-x <replaceable class="parameter">xid</replaceable> </arg> <arg>-m <replaceable class="parameter">mxid</replaceable> </arg> @@ -57,22 +58,22 @@ PostgreSQL documentation <para> If <command>pg_resetxlog</command> complains that it cannot determine - valid data for <filename>pg_control</>, you can force it to proceed anyway - by specifying the <literal>-f</> (force) switch. In this case plausible - values will be substituted for the missing data. Most of the fields can be - expected to match, but manual assistance may be needed for the next OID, - next transaction ID, next multitransaction ID and offset, - WAL starting address, and database locale fields. - The first five of these can be set using the switches discussed below. - <command>pg_resetxlog</command>'s own environment is the source for its - guess at the locale fields; take care that <envar>LANG</> and so forth - match the environment that <command>initdb</> was run in. - If you are not able to determine correct values for all these fields, - <literal>-f</> can still be used, but + valid data for <filename>pg_control</>, you can force it to proceed + anyway by specifying the <literal>-f</> (force) switch. In this case + plausible values will be substituted for the missing data. + <command>pg_resetxlog</command>'s own environment is the source for + its guess at the locale fields; take care that <envar>LANG</> and so + forth match the environment that <command>initdb</> was run in. + <filename>/xlog</> files are used to determine other parameters, like + next OID, next transaction ID, next multi-transaction ID and offset, + WAL starting address, and database locale fields. Because determined + values might be wrong, the first five of these can be set using the + switches discussed below. If you are not able to determine correct + values for all these fields, <literal>-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. <emphasis>Do not</> - execute any data-modifying operations in the database before you dump; - as any such action is likely to make the corruption worse. + usual: an immediate dump and reload is imperative. <emphasis>Do + not</> execute any data-modifying operations in the database before + you dump; as any such action is likely to make the corruption worse. </para> <para> @@ -150,6 +151,11 @@ PostgreSQL documentation </para> <para> + The <literal>-r</> restores <filename>pg_control</> counters listed + above without resetting the write-ahead log. + </para> + + <para> The <literal>-n</> (no operation) switch instructs <command>pg_resetxlog</command> to print the values reconstructed from <filename>pg_control</> and then exit without modifying anything. |