Content-Length: 259188 | pFad | http://github.com/postgrespro/postgres/commit/4bcb3946249cbeed157ffd545a804913cfce749b

BF Propagate system identifier generation improvement into pg_resetxlog. · postgrespro/postgres@4bcb394 · GitHub
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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/4bcb3946249cbeed157ffd545a804913cfce749b

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy