Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 6495714

Browse files
author
Maksim Milyutin
committed
make in-params of initdb as absolute values of xid, mx_id; fix initdb help
1 parent 54c4fa8 commit 6495714

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

src/backend/access/transam/xlog.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4810,10 +4810,9 @@ BootStrapXLOG(void)
48104810
checkPoint.ThisTimeLineID = ThisTimeLineID;
48114811
checkPoint.PrevTimeLineID = ThisTimeLineID;
48124812
checkPoint.fullPageWrites = fullPageWrites;
4813-
checkPoint.nextXid = FirstNormalTransactionId + 1 + start_xid;
4813+
checkPoint.nextXid = Max(FirstNormalTransactionId + 1, start_xid);
48144814
checkPoint.nextOid = FirstBootstrapObjectId;
4815-
checkPoint.nextMulti = (!start_mx_id) ? FirstMultiXactId + 1
4816-
: FirstMultiXactId + start_mx_id;
4815+
checkPoint.nextMulti = Max(FirstMultiXactId + 1, start_mx_id);
48174816
checkPoint.nextMultiOffset = start_mx_offset;
48184817
checkPoint.oldestXid = checkPoint.nextXid - 1;
48194818
checkPoint.oldestXidDB = TemplateDbOid;

src/bin/initdb/initdb.c

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2689,19 +2689,24 @@ usage(const char *progname)
26892689
printf(_(" --no-locale equivalent to --locale=C\n"));
26902690
printf(_(" --pwfile=FILE read password for the new superuser from file\n"));
26912691
printf(_(" -T, --text-search-config=CFG\n"
2692-
" default text search configuration\n"));
2692+
" default text search configuration\n"));
26932693
printf(_(" -U, --username=NAME database superuser name\n"));
26942694
printf(_(" -W, --pwprompt prompt for a password for the new superuser\n"));
26952695
printf(_(" -X, --xlogdir=XLOGDIR location for the transaction log directory\n"));
2696-
printf(_(" -x, --xid=START_XID specify start xid in hex format for new instance to test 64-bit xids, default value is 0\n"));
2696+
printf(_(" -x, --xid=START_XID specify start xid value in hex format for new db instance to test 64-bit xids,\n"
2697+
" default value is 0\n"));
26972698
printf(_("\nLess commonly used options:\n"));
26982699
printf(_(" -d, --debug generate lots of debugging output\n"));
26992700
printf(_(" -k, --data-checksums use data page checksums\n"));
27002701
printf(_(" -L DIRECTORY where to find the input files\n"));
2701-
printf(_(" -m, --multixact-id=MX_ID specify multixact id in hex format for new instance to test 64-bit xids, default value is 0\n"));
2702+
printf(_(" -m, --multixact-id=START_MX_ID\n"
2703+
" specify start multixact id value in hex format for new db instance\n"
2704+
" to test 64-bit xids, default value is 0\n"));
27022705
printf(_(" -n, --noclean do not clean up after errors\n"));
27032706
printf(_(" -N, --nosync do not wait for changes to be written safely to disk\n"));
2704-
printf(_(" -o, --multixact-offset=MX_OFFSET specify multixact offset in hex format for new instance to test 64-bit xids, default value is 0\n"));
2707+
printf(_(" -o, --multixact-offset=START_MX_OFFSET\n"
2708+
" specify start multixact offset value in hex format for new db instance\n"
2709+
" to test 64-bit xids, default value is 0\n"));
27052710
printf(_(" -s, --show show internal settings\n"));
27062711
printf(_(" -S, --sync-only only sync data directory\n"));
27072712
printf(_("\nOther options:\n"));

0 commit comments

Comments
 (0)