From f5b2f60bd1084e218358adba04604147e5429233 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Wed, 8 Jun 2005 15:50:28 +0000 Subject: Change WAL-logging scheme for multixacts to be more like regular transaction IDs, rather than like subtrans; in particular, the information now survives a database restart. Per previous discussion, this is essential for PITR log shipping and for 2PC. --- doc/src/sgml/ref/pg_resetxlog.sgml | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/ref/pg_resetxlog.sgml b/doc/src/sgml/ref/pg_resetxlog.sgml index f5915adacd4..f4caa8b80e6 100644 --- a/doc/src/sgml/ref/pg_resetxlog.sgml +++ b/doc/src/sgml/ref/pg_resetxlog.sgml @@ -1,5 +1,5 @@ @@ -23,6 +23,7 @@ PostgreSQL documentation -o oid -x xid -m mxid + -O mxoff -l timelineid,fileid,seg datadir @@ -32,8 +33,8 @@ PostgreSQL documentation Description pg_resetxlog clears the write-ahead log (WAL) and - optionally resets some other control information (stored in the - pg_control file). This function is sometimes needed + optionally resets some other control information stored in the + pg_control file. This function is sometimes needed if these files have become corrupted. It should be used only as a last resort, when the server will not start due to such corruption. @@ -60,8 +61,9 @@ PostgreSQL documentation by specifying the -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, WAL starting address, and database locale fields. - The first three of these can be set using the switches discussed below. + next transaction ID, next multi-transaction ID and offset, + WAL starting address, and database locale fields. + The first five of these can be set using the switches discussed below. pg_resetxlog's own environment is the source for its guess at the locale fields; take care that LANG and so forth match the environment that initdb was run in. @@ -74,9 +76,10 @@ PostgreSQL documentation - The -o, -x, -m, and -l + The -o, -x, -m, -O, + and -l switches allow the next OID, next transaction ID, next multi-transaction - ID, and WAL starting address values to + ID, next multi-transaction offset, and WAL starting address values to be set manually. These are only needed when pg_resetxlog is unable to determine appropriate values by reading pg_control. Safe values may be determined as @@ -108,6 +111,17 @@ PostgreSQL documentation + + + A safe value for the next multi-transaction offset (-O) + may be determined by looking for the numerically largest + file name in the directory 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 switch value in hexadecimal and add four zeroes. + + + The WAL starting address (-l) should be -- cgit v1.2.3