postgresql/src/backend/access/rmgrdesc
Thomas Munro 2fc7af5e96 Add basic infrastructure for 64 bit transaction IDs.
Instead of inferring epoch progress from xids and checkpoints,
introduce a 64 bit FullTransactionId type and use it to track xid
generation.  This fixes an unlikely bug where the epoch is reported
incorrectly if the range of active xids wraps around more than once
between checkpoints.

The only user-visible effect of this commit is to correct the epoch
used by txid_current() and txid_status(), also visible with
pg_controldata, in those rare circumstances.  It also creates some
basic infrastructure so that later patches can use 64 bit
transaction IDs in more places.

The new type is a struct that we pass by value, as a form of strong
typedef.  This prevents the sort of accidental confusion between
TransactionId and FullTransactionId that would be possible if we
were to use a plain old uint64.

Author: Thomas Munro
Reported-by: Amit Kapila
Reviewed-by: Andres Freund, Tom Lane, Heikki Linnakangas
Discussion: https://postgr.es/m/CAA4eK1%2BMv%2Bmb0HFfWM9Srtc6MVe160WFurXV68iAFMcagRZ0dQ%40mail.gmail.com
2019-03-28 18:12:20 +13:00
..
Makefile Generic Messages for Logical Decoding 2016-04-06 10:05:41 +01:00
brindesc.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
clogdesc.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
committsdesc.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
dbasedesc.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
genericdesc.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
gindesc.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
gistdesc.c Delete empty pages during GiST VACUUM. 2019-03-22 13:21:45 +02:00
hashdesc.c Compute XID horizon for page level index vacuum on primary. 2019-03-26 16:52:54 -07:00
heapdesc.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
logicalmsgdesc.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
mxactdesc.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
nbtdesc.c Compute XID horizon for page level index vacuum on primary. 2019-03-26 16:52:54 -07:00
relmapdesc.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
replorigindesc.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
seqdesc.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
smgrdesc.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
spgdesc.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
standbydesc.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
tblspcdesc.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
xactdesc.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
xlogdesc.c Add basic infrastructure for 64 bit transaction IDs. 2019-03-28 18:12:20 +13:00