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

Lines changed: 2 additions & 1 deletion
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy