1
1
<!--
2
- $PostgreSQL: pgsql/doc/src/sgml/ref/pg_resetxlog.sgml,v 1.10 2005/04/28 21:47:10 tgl Exp $
2
+ $PostgreSQL: pgsql/doc/src/sgml/ref/pg_resetxlog.sgml,v 1.11 2005/06/08 15:50:21 tgl Exp $
3
3
PostgreSQL documentation
4
4
-->
5
5
@@ -23,6 +23,7 @@ PostgreSQL documentation
23
23
<arg> -o <replaceable class="parameter">oid</replaceable> </arg>
24
24
<arg> -x <replaceable class="parameter">xid</replaceable> </arg>
25
25
<arg> -m <replaceable class="parameter">mxid</replaceable> </arg>
26
+ <arg> -O <replaceable class="parameter">mxoff</replaceable> </arg>
26
27
<arg> -l <replaceable class="parameter">timelineid</replaceable>,<replaceable class="parameter">fileid</replaceable>,<replaceable class="parameter">seg</replaceable> </arg>
27
28
<arg choice="plain"><replaceable>datadir</replaceable></arg>
28
29
</cmdsynopsis>
@@ -32,8 +33,8 @@ PostgreSQL documentation
32
33
<title>Description</title>
33
34
<para>
34
35
<command>pg_resetxlog</command> clears the write-ahead log (WAL) and
35
- optionally resets some other control information ( stored in the
36
- <filename>pg_control</> file) . This function is sometimes needed
36
+ optionally resets some other control information stored in the
37
+ <filename>pg_control</> file. This function is sometimes needed
37
38
if these files have become corrupted. It should be used only as a
38
39
last resort, when the server will not start due to such corruption.
39
40
</para>
@@ -60,8 +61,9 @@ PostgreSQL documentation
60
61
by specifying the <literal>-f</> (force) switch. In this case plausible
61
62
values will be substituted for the missing data. Most of the fields can be
62
63
expected to match, but manual assistance may be needed for the next OID,
63
- next transaction ID, WAL starting address, and database locale fields.
64
- The first three of these can be set using the switches discussed below.
64
+ next transaction ID, next multi-transaction ID and offset,
65
+ WAL starting address, and database locale fields.
66
+ The first five of these can be set using the switches discussed below.
65
67
<command>pg_resetxlog</command>'s own environment is the source for its
66
68
guess at the locale fields; take care that <envar>LANG</> and so forth
67
69
match the environment that <command>initdb</> was run in.
@@ -74,9 +76,10 @@ PostgreSQL documentation
74
76
</para>
75
77
76
78
<para>
77
- The <literal>-o</>, <literal>-x</>, <literal>-m</>, and <literal>-l</>
79
+ The <literal>-o</>, <literal>-x</>, <literal>-m</>, <literal>-O</>,
80
+ and <literal>-l</>
78
81
switches allow the next OID, next transaction ID, next multi-transaction
79
- ID, and WAL starting address values to
82
+ ID, next multi-transaction offset, and WAL starting address values to
80
83
be set manually. These are only needed when
81
84
<command>pg_resetxlog</command> is unable to determine appropriate values
82
85
by reading <filename>pg_control</>. Safe values may be determined as
@@ -108,6 +111,17 @@ PostgreSQL documentation
108
111
</para>
109
112
</listitem>
110
113
114
+ <listitem>
115
+ <para>
116
+ A safe value for the next multi-transaction offset (<literal>-O</>)
117
+ may be determined by looking for the numerically largest
118
+ file name in the directory <filename>pg_multixact/members</> under the
119
+ data directory, adding one, and then multiplying by 65536. As above,
120
+ the file names are in hexadecimal, so the easiest way to do this is to
121
+ specify the switch value in hexadecimal and add four zeroes.
122
+ </para>
123
+ </listitem>
124
+
111
125
<listitem>
112
126
<para>
113
127
The WAL starting address (<literal>-l</>) should be
0 commit comments