From 0df32e3cbef991f2fcec6498ff882d8172a35d28 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Wed, 26 Apr 2006 02:17:15 +0000 Subject: 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 --- doc/src/sgml/ref/pg_resetxlog.sgml | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) (limited to 'doc/src') 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 @@ @@ -20,6 +20,7 @@ PostgreSQL documentation pg_resetxlog -f -n + -r -ooid -x xid -m mxid @@ -57,22 +58,22 @@ PostgreSQL documentation If pg_resetxlog complains that it cannot determine - valid data for pg_control, you can force it to proceed anyway - by specifying the -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. - pg_resetxlog's own environment is the source for its - guess at the locale fields; take care that LANG and so forth - match the environment that initdb was run in. - If you are not able to determine correct values for all these fields, - -f can still be used, but + valid data for pg_control, you can force it to proceed + anyway by specifying the -f (force) switch. In this case + plausible values will be substituted for the missing data. + pg_resetxlog's own environment is the source for + its guess at the locale fields; take care that LANG and so + forth match the environment that initdb was run in. + /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, -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; - as any such action is likely to make the corruption worse. + usual: an immediate dump and reload is imperative. Do + not execute any data-modifying operations in the database before + you dump; as any such action is likely to make the corruption worse. @@ -149,6 +150,11 @@ PostgreSQL documentation + + The -r restores pg_control counters listed + above without resetting the write-ahead log. + + The -n (no operation) switch instructs pg_resetxlog to print the values reconstructed from -- cgit v1.2.3