diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2014-05-27 22:01:13 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2014-05-27 22:01:13 -0400 |
commit | 4bcb3946249cbeed157ffd545a804913cfce749b (patch) | |
tree | 3f20434c2329bd8e0ffd4a9336d7a5c303e80ba9 | |
parent | 49cf2cd815d61e1399fe46f9532347f09c3ed2f9 (diff) | |
download | postgresql-4bcb3946249cbeed157ffd545a804913cfce749b.tar.gz postgresql-4bcb3946249cbeed157ffd545a804913cfce749b.zip |
Propagate system identifier generation improvement into pg_resetxlog.
Commit 5035701e07e8bd395aa878465a102afd7b74e8c3 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.
-rw-r--r-- | src/bin/pg_resetxlog/pg_resetxlog.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bin/pg_resetxlog/pg_resetxlog.c b/src/bin/pg_resetxlog/pg_resetxlog.c index 8671c0a4a3d..d11280e1d4d 100644 --- a/src/bin/pg_resetxlog/pg_resetxlog.c +++ b/src/bin/pg_resetxlog/pg_resetxlog.c @@ -492,7 +492,8 @@ GuessControlValues(void) */ gettimeofday(&tv, NULL); sysidentifier = ((uint64) tv.tv_sec) << 32; - sysidentifier |= (uint32) (tv.tv_sec | tv.tv_usec); + sysidentifier |= ((uint64) tv.tv_usec) << 12; + sysidentifier |= getpid() & 0xFFF; ControlFile.system_identifier = sysidentifier; |