pg_log_error_hint("Try \"%s --help\" for more information.", progname);
exit(1);
}
+
+ /* offset 0 means "invalid" in pg_multixact/offsets */
+ if (next_mxoff_val == 0)
+ pg_fatal("next multitransaction offset (-O) must not be 0");
next_mxoff_given = true;
break;
FullTransactionIdFromEpochAndXid(0, FirstNormalTransactionId);
ControlFile.checkPointCopy.nextOid = FirstGenbkiObjectId;
ControlFile.checkPointCopy.nextMulti = FirstMultiXactId;
- ControlFile.checkPointCopy.nextMultiOffset = 0;
+ ControlFile.checkPointCopy.nextMultiOffset = 1;
ControlFile.checkPointCopy.oldestXid = FirstNormalTransactionId;
ControlFile.checkPointCopy.oldestXidDB = InvalidOid;
ControlFile.checkPointCopy.oldestMulti = FirstMultiXactId;
[ 'pg_resetwal', '-O' => '-1', $node->data_dir ],
qr/error: invalid argument for option -O/,
'fails with -O value -1');
+command_fails_like(
+ [ 'pg_resetwal', '-O' => '0', $node->data_dir ],
+ qr/must not be 0/,
+ 'fails with -O value 0');
# --wal-segsize
command_fails_like(
[ 'pg_resetwal', '--wal-segsize' => 'foo', $node->data_dir ],