summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2006-12-08 19:50:53 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2006-12-08 19:50:53 +0000
commit0cb91ccba93038c57a7dda6388c9f6bcd5cc52c0 (patch)
tree7b6d7b2ee9fe0e371717540d1d0354e8a54788b0 /doc
parent98cacd1a0aa8486f21b18827c556b50936222d3e (diff)
Remove the logId/logSeg fields from pg_control, because they are not needed
in normal operation, and we can avoid rewriting pg_control at every log segment switch if we don't insist that these values be valid. Reducing the number of pg_control updates is a good idea for both performance and reliability. It does make pg_resetxlog's life a bit harder, but that seems a good tradeoff; and anyway the change to pg_resetxlog amounts to automating something people formerly needed to do by hand, namely look at the existing pg_xlog files to make sure the new WAL start point was past them. In passing, change the wording of xlog.c's "database system was interrupted" messages: describe the pg_control timestamp as "last known up at" rather than implying it is the exact time of service interruption. With this change the timestamp will generally be the time of the last checkpoint, which could be many minutes before the failure; and we've already seen indications that people tend to misinterpret the old wording. initdb forced due to change in pg_control layout. Simon Riggs and Tom Lane
Diffstat (limited to 'doc')
-rw-r--r--doc/src/sgml/ref/pg_resetxlog.sgml18
1 files changed, 15 insertions, 3 deletions
diff --git a/doc/src/sgml/ref/pg_resetxlog.sgml b/doc/src/sgml/ref/pg_resetxlog.sgml
index 11d5d1eef63..c1c9754368f 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.18 2006/09/16 00:30:19 momjian Exp $
+$PostgreSQL: pgsql/doc/src/sgml/ref/pg_resetxlog.sgml,v 1.19 2006/12/08 19:50:52 tgl Exp $
PostgreSQL documentation
-->
@@ -72,7 +72,7 @@ PostgreSQL documentation
<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;
+ execute any data-modifying operations in the database before you dump,
as any such action is likely to make the corruption worse.
</para>
@@ -127,7 +127,7 @@ PostgreSQL documentation
<listitem>
<para>
The WAL starting address (<literal>-l</>) should be
- larger than any file name currently existing in
+ larger than any WAL segment file name currently existing in
the directory <filename>pg_xlog</> under the data directory.
These names are also in hexadecimal and have three parts. The first
part is the <quote>timeline ID</> and should usually be kept the same.
@@ -139,6 +139,18 @@ PostgreSQL documentation
<filename>000000010000003A000000FF</>, choose <literal>-l 0x1,0x3B,0x0</>
or more.
</para>
+
+ <note>
+ <para>
+ <command>pg_resetxlog</command> itself looks at the files in
+ <filename>pg_xlog</> and chooses a default <literal>-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
+ files that are not currently present in <filename>pg_xlog</>, such as
+ entries in an offline archive; or if the contents of
+ <filename>pg_xlog</> have been lost entirely.
+ </para>
+ </note>
</listitem>
<listitem>