Skip to content

Commit 9db4ad4

Browse files
committed
Update pg_resetxlog's documentation on multixacts
I added some more functionality to it in 0ac5ad5 but neglected to add it to the docs. Per Peter Eisentraut in message 1367112171.32604.4.camel@vanquo.pezone.net
1 parent 863fad1 commit 9db4ad4

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

doc/src/sgml/ref/pg_resetxlog.sgml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ PostgreSQL documentation
2727
<arg choice="opt"><option>-o</option> <replaceable class="parameter">oid</replaceable></arg>
2828
<arg choice="opt"><option>-x</option> <replaceable class="parameter">xid</replaceable></arg>
2929
<arg choice="opt"><option>-e</option> <replaceable class="parameter">xid_epoch</replaceable></arg>
30-
<arg choice="opt"><option>-m</option> <replaceable class="parameter">mxid</replaceable></arg>
30+
<arg choice="opt"><option>-m</option> <replaceable class="parameter">mxid</replaceable>,<replaceable class="parameter">mxid</replaceable></arg>
3131
<arg choice="opt"><option>-O</option> <replaceable class="parameter">mxoff</replaceable></arg>
3232
<arg choice="opt"><option>-l</option> <replaceable class="parameter">xlogfile</replaceable></arg>
3333
<arg choice="plain"><replaceable>datadir</replaceable></arg>
@@ -81,7 +81,7 @@ PostgreSQL documentation
8181
<option>-m</>, <option>-O</>,
8282
and <option>-l</>
8383
options allow the next OID, next transaction ID, next transaction ID's
84-
epoch, next multitransaction ID, next multitransaction offset, and WAL
84+
epoch, next and oldest multitransaction ID, next multitransaction offset, and WAL
8585
starting address values to be set manually. These are only needed when
8686
<command>pg_resetxlog</command> is unable to determine appropriate values
8787
by reading <filename>pg_control</>. Safe values can be determined as
@@ -104,12 +104,16 @@ PostgreSQL documentation
104104

105105
<listitem>
106106
<para>
107-
A safe value for the next multitransaction ID (<option>-m</>)
107+
A safe value for the next multitransaction ID (first part of <option>-m</>)
108108
can be determined by looking for the numerically largest
109109
file name in the directory <filename>pg_multixact/offsets</> under the
110-
data directory, adding one, and then multiplying by 65536. As above,
111-
the file names are in hexadecimal, so the easiest way to do this is to
112-
specify the option value in hexadecimal and add four zeroes.
110+
data directory, adding one, and then multiplying by 65536.
111+
Conversely, a safe value for the oldest multitransaction ID (second part of
112+
<option>-m</>)
113+
can be determined by looking for the numerically smallest
114+
file name in the same directory and multiplying by 65536.
115+
As above, the file names are in hexadecimal, so the easiest way to do
116+
this is to specify the option value in hexadecimal and append four zeroes.
113117
</para>
114118
</listitem>
115119

@@ -118,9 +122,9 @@ PostgreSQL documentation
118122
A safe value for the next multitransaction offset (<option>-O</>)
119123
can be determined by looking for the numerically largest
120124
file name in the directory <filename>pg_multixact/members</> under the
121-
data directory, adding one, and then multiplying by 65536. As above,
122-
the file names are in hexadecimal, so the easiest way to do this is to
123-
specify the option value in hexadecimal and add four zeroes.
125+
data directory, adding one, and then multiplying by 52352. As above,
126+
the file names are in hexadecimal. There is no simple recipe such as
127+
the ones above of appending zeroes.
124128
</para>
125129
</listitem>
126130

src/bin/pg_resetxlog/pg_resetxlog.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1036,7 +1036,7 @@ usage(void)
10361036
printf(_(" -e XIDEPOCH set next transaction ID epoch\n"));
10371037
printf(_(" -f force update to be done\n"));
10381038
printf(_(" -l XLOGFILE force minimum WAL starting location for new transaction log\n"));
1039-
printf(_(" -m XID,OLDEST set next multitransaction ID and oldest value\n"));
1039+
printf(_(" -m XID,XID set next and oldest multitransaction ID\n"));
10401040
printf(_(" -n no update, just show extracted control values (for testing)\n"));
10411041
printf(_(" -o OID set next OID\n"));
10421042
printf(_(" -O OFFSET set next multitransaction offset\n"));

0 commit comments

Comments
 (0)