Skip to content

Commit 4bcb394

Browse files
committed
Propagate system identifier generation improvement into pg_resetxlog.
Commit 5035701 improved xlog.c's method for creating a database system identifier, but I neglected to fix the copy of that code appearing in pg_resetxlog.c. Spotted by Andres Freund.
1 parent 49cf2cd commit 4bcb394

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/bin/pg_resetxlog/pg_resetxlog.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,8 @@ GuessControlValues(void)
492492
*/
493493
gettimeofday(&tv, NULL);
494494
sysidentifier = ((uint64) tv.tv_sec) << 32;
495-
sysidentifier |= (uint32) (tv.tv_sec | tv.tv_usec);
495+
sysidentifier |= ((uint64) tv.tv_usec) << 12;
496+
sysidentifier |= getpid() & 0xFFF;
496497

497498
ControlFile.system_identifier = sysidentifier;
498499

0 commit comments

Comments
 (0)