From 08f245bfd44179428a004417e1385f2c176e4a59 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Sat, 17 Aug 2002 02:45:29 +0000 Subject: [PATCH] Add doc file for pg_resetxlog. --- doc/src/sgml/ref/pg_resetxlog.sgml | 89 ++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 doc/src/sgml/ref/pg_resetxlog.sgml diff --git a/doc/src/sgml/ref/pg_resetxlog.sgml b/doc/src/sgml/ref/pg_resetxlog.sgml new file mode 100644 index 0000000000..fe2b3b34d2 --- /dev/null +++ b/doc/src/sgml/ref/pg_resetxlog.sgml @@ -0,0 +1,89 @@ + + + + + pg_resetxlog + 1 + Application + + + + pg_resetxlog + reset write-ahead log file and optionally the pg_controldata file + + + + + pg_resetxlog + datadir + + + + + Description + + pg_resetxlog clears the write-ahead log file and + optionally the pg_controldata file. This is + used so the server can be started after these files have become corrupted. + (In every reported case, such file corruption has been caused + by faulty hardware.) It is to be used only as a last resort, + when the server will not start due to such corruption. + + + + After running this command, the server may contain index corruption and + partially-committed transactions. You should immediately dump your data + and reload. After reload, check for partially committed transactions + that may have been open at the time of the server crash. + + + + pg_resetxlog can also fix a corrupted + pg_controldata file using the -f + flag. Use this option when pg_resetxlog reports it can't + reconstruct valid data for pg_control. + + + + pg_resetxlog has a few more options for + special purposes. Run the command with no arguments to see them. + + + + This utility can only be run by the user who installed the server because + it requires read/write access to the datadir. + For safety reasons, you must specify the data directory on the command line. + It does not use the environment variable PGDATA. + + + + + Notes + + + This command can not be used when the postmaster is + running. + + + + + + -- GitLab