From bc62da6173e029e1fd25d13bbbe648f008be6b68 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Tue, 19 Sep 2023 16:11:38 +0200 Subject: [PATCH v2 6/7] doc: pg_resetwal: Add comments how the multipliers are derived --- doc/src/sgml/ref/pg_resetwal.sgml | 8 +++++++- src/bin/pg_resetwal/pg_resetwal.c | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/doc/src/sgml/ref/pg_resetwal.sgml b/doc/src/sgml/ref/pg_resetwal.sgml index 1f9c4b69dd..8380f97c04 100644 --- a/doc/src/sgml/ref/pg_resetwal.sgml +++ b/doc/src/sgml/ref/pg_resetwal.sgml @@ -166,7 +166,8 @@ Options pg_resetwal is unable to determine appropriate values by reading pg_control. Safe values can be determined as described below. For values that take numeric arguments, hexadecimal - values can be specified by using the prefix 0x. + values can be specified by using the prefix 0x. Note + that these instructions only apply with the standard block size of 8 kB. @@ -189,6 +190,7 @@ Options greatest file name in the same directory. The file names are in hexadecimal. + @@ -272,6 +274,7 @@ Options names are in hexadecimal, so the easiest way to do this is to specify the option value in hexadecimal and append four zeroes. + @@ -306,6 +309,7 @@ Options The file names are in hexadecimal. There is no simple recipe such as the ones for other options of appending zeroes. + @@ -354,6 +358,7 @@ Options in pg_xact, -u 0x700000 will work (five trailing zeroes provide the proper multiplier). + @@ -375,6 +380,7 @@ Options in pg_xact, -x 0x1200000 will work (five trailing zeroes provide the proper multiplier). + diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index 47e05bd2c9..89b35c2748 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -211,6 +211,7 @@ main(int argc, char *argv[]) exit(1); } + // FIXME: why 2? if (set_oldest_commit_ts_xid < 2 && set_oldest_commit_ts_xid != 0) pg_fatal("transaction ID (-c) must be either 0 or greater than or equal to 2"); -- 2.42.0