aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gin/ginxlog.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2014-04-26 15:11:10 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2014-04-26 15:11:10 -0400
commit5035701e07e8bd395aa878465a102afd7b74e8c3 (patch)
tree0e35eeba44df8079d0ed0c46c5d75aaa0e42b586 /src/backend/access/gin/ginxlog.c
parent528c454b2ada89ca0f0cd9a64f939e775b55b879 (diff)
downloadpostgresql-5035701e07e8bd395aa878465a102afd7b74e8c3.tar.gz
postgresql-5035701e07e8bd395aa878465a102afd7b74e8c3.zip
Improve generation algorithm for database system identifier.
As noted some time ago, the original coding had a typo ("|" for "^") that made the result less unique than intended. Even the intended behavior is obsolete since it was based on wanting to produce a usable value even if we didn't have int64 arithmetic --- a limitation we stopped supporting years ago. Instead, let's redefine the system identifier as tv_sec in the upper 32 bits (same as before), tv_usec in the next 20 bits, and the low 12 bits of getpid() in the remaining bits. This is still hardly guaranteed-universally-unique, but it's noticeably better than before. Per my proposal at <29019.1374535940@sss.pgh.pa.us>
Diffstat (limited to 'src/backend/access/gin/ginxlog.c')
0 files changed, 0 insertions, 0 deletions