]> granicus.if.org Git - postgresql/commitdiff
Update pg_resetxlog's documentation on multixacts
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Thu, 27 Jun 2013 19:31:04 +0000 (15:31 -0400)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Thu, 27 Jun 2013 19:35:34 +0000 (15:35 -0400)
I added some more functionality to it in 0ac5ad5134f27 but neglected to
add it to the docs.

Per Peter Eisentraut in message
1367112171.32604.4.camel@vanquo.pezone.net

doc/src/sgml/ref/pg_resetxlog.sgml
src/bin/pg_resetxlog/pg_resetxlog.c

index 90c772195cd2c1d3ac593b18efa27c89d7c804b5..c680680fe781c19fb3a319ae26b1ec20f50635a4 100644 (file)
@@ -27,7 +27,7 @@ PostgreSQL documentation
    <arg choice="opt"><option>-o</option> <replaceable class="parameter">oid</replaceable></arg>
    <arg choice="opt"><option>-x</option> <replaceable class="parameter">xid</replaceable></arg>
    <arg choice="opt"><option>-e</option> <replaceable class="parameter">xid_epoch</replaceable></arg>
-   <arg choice="opt"><option>-m</option> <replaceable class="parameter">mxid</replaceable></arg>
+   <arg choice="opt"><option>-m</option> <replaceable class="parameter">mxid</replaceable>,<replaceable class="parameter">mxid</replaceable></arg>
    <arg choice="opt"><option>-O</option> <replaceable class="parameter">mxoff</replaceable></arg>
    <arg choice="opt"><option>-l</option> <replaceable class="parameter">xlogfile</replaceable></arg>
    <arg choice="plain"><replaceable>datadir</replaceable></arg>
@@ -81,7 +81,7 @@ PostgreSQL documentation
    <option>-m</>, <option>-O</>,
    and <option>-l</>
    options allow the next OID, next transaction ID, next transaction ID's
-   epoch, next multitransaction ID, next multitransaction offset, and WAL
+   epoch, next and oldest multitransaction ID, next multitransaction offset, and WAL
    starting address values to be set manually.  These are only needed when
    <command>pg_resetxlog</command> is unable to determine appropriate values
    by reading <filename>pg_control</>.  Safe values can be determined as
@@ -104,12 +104,16 @@ PostgreSQL documentation
 
     <listitem>
      <para>
-      A safe value for the next multitransaction ID (<option>-m</>)
+      A safe value for the next multitransaction ID (first part of <option>-m</>)
       can be determined by looking for the numerically largest
       file name in the directory <filename>pg_multixact/offsets</> under the
-      data directory, adding one, and then multiplying by 65536.  As above,
-      the file names are in hexadecimal, so the easiest way to do this is to
-      specify the option value in hexadecimal and add four zeroes.
+      data directory, adding one, and then multiplying by 65536.
+      Conversely, a safe value for the oldest multitransaction ID (second part of
+      <option>-m</>)
+      can be determined by looking for the numerically smallest
+      file name in the same directory and multiplying by 65536.
+      As above, the file names are in hexadecimal, so the easiest way to do
+      this is to specify the option value in hexadecimal and append four zeroes.
      </para>
     </listitem>
 
@@ -118,9 +122,9 @@ PostgreSQL documentation
       A safe value for the next multitransaction offset (<option>-O</>)
       can be determined by looking for the numerically largest
       file name in the directory <filename>pg_multixact/members</> under the
-      data directory, adding one, and then multiplying by 65536.  As above,
-      the file names are in hexadecimal, so the easiest way to do this is to
-      specify the option value in hexadecimal and add four zeroes.
+      data directory, adding one, and then multiplying by 52352.  As above,
+      the file names are in hexadecimal.  There is no simple recipe such as
+      the ones above of appending zeroes.
      </para>
     </listitem>
 
index 82018e449f27218f57be22e78568d04f4bf9ad2b..6d3e9f5439f652f1ddac73c0c5b4d86bc7d571c7 100644 (file)
@@ -1036,7 +1036,7 @@ usage(void)
        printf(_("  -e XIDEPOCH      set next transaction ID epoch\n"));
        printf(_("  -f               force update to be done\n"));
        printf(_("  -l XLOGFILE      force minimum WAL starting location for new transaction log\n"));
-       printf(_("  -m XID,OLDEST    set next multitransaction ID and oldest value\n"));
+       printf(_("  -m XID,XID       set next and oldest multitransaction ID\n"));
        printf(_("  -n               no update, just show extracted control values (for testing)\n"));
        printf(_("  -o OID           set next OID\n"));
        printf(_("  -O OFFSET        set next multitransaction offset\n"));