Discussion:
64-bit TXID?
cowwoc
2014-09-19 04:17:26 UTC
Permalink
Hi,

A recent discussion in Slashdot brought up the topic of PostgreSQL's 32-bit
TXID system: http://slashdot.org/comments.pl?sid=5725497&cid=47942637

I did a quick search and noticed that 8 years ago, a Skype employee provided
a patch for migrating to a 64-bit TXID:
http://postgresql.1045698.n5.nabble.com/RFC-txid-module-for-64-bit-external-transaction-IDs-tt1947503.html

The conversation seemed to die there (I couldn't find any follow-up).

If I were Facebook (which clearly I am not) should I be worried about this
sort of thing? And out of curiosity, why didn't PostgreSQL migrate to a
64-bit value?

Thanks,
Gili



--
View this message in context: http://postgresql.1045698.n5.nabble.com/64-bit-TXID-tp5819589.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.
--
Sent via pgsql-general mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Peter Geoghegan
2014-09-19 04:38:20 UTC
Permalink
Post by cowwoc
I did a quick search and noticed that 8 years ago, a Skype employee provided
http://postgresql.1045698.n5.nabble.com/RFC-txid-module-for-64-bit-external-transaction-IDs-tt1947503.html
Actually, this patch was supposed to:

"""
The goal is to make PostgreSQL internal transaction ID and snapshot
data usable externally. They cannot be used directly as the
internal 4-byte value wraps around and thus breaks indexing.
"""

This stuff was committed to PostgreSQL in essentially the same form years ago:

http://www.postgresql.org/docs/devel/static/functions-info.html#FUNCTIONS-TXID-SNAPSHOT

It's just a way of getting a stable 64-bit xid value for external use,
by adding an epoch count to the representation. Nothing more.

The most obvious reason for not using 64-bit xid values is that they
require more storage than 32-bit values. There is a patch floating
around that makes it safe to not forcibly safety shutdown the server
where currently it is necessary, but it doesn't work by making xids
64-bit.
--
Regards,
Peter Geoghegan
--
Sent via pgsql-general mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Loading...