提交 0df32e3c 编写于 作者: B Bruce Momjian

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
上级 3289a932
<!--
$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>
......@@ -149,6 +150,11 @@ PostgreSQL documentation
</itemizedlist>
</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
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册