postgresql/src/backend
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
..
access Add basic infrastructure for 64 bit transaction IDs. 2019-03-28 18:12:20 +13:00
bootstrap tableam: Add and use scan APIs. 2019-03-11 12:46:41 -07:00
catalog tableam: Support for an index build's initial table scan(s). 2019-03-27 19:59:06 -07:00
commands Add support for multivariate MCV lists 2019-03-27 18:32:18 +01:00
executor tableam: Add table_get_latest_tid, to wrap heap_get_latest_tid. 2019-03-25 17:14:48 -07:00
foreign Update copyright for 2019 2019-01-02 12:44:25 -05:00
jit Renaming for new subscripting mechanism 2019-02-01 12:50:32 -03:00
lib Further code review for new integerset code. 2019-03-25 12:23:48 -04:00
libpq Add DNS SRV support for LDAP server discovery. 2019-03-21 15:28:17 +13:00
main Replace @postgresql.org with @lists.postgresql.org for mailinglists 2019-01-19 19:06:35 +01:00
nodes Add support for multivariate MCV lists 2019-03-27 18:32:18 +01:00
optimizer Add support for multivariate MCV lists 2019-03-27 18:32:18 +01:00
parser Add support for multivariate MCV lists 2019-03-27 18:32:18 +01:00
partitioning Fix misplaced const 2019-03-26 09:23:08 +01:00
po Translation updates 2018-06-25 12:37:18 +02:00
port Add shared_memory_type GUC. 2019-02-03 12:47:26 +01:00
postmaster Add macro to cast away volatile without allowing changes to underlying type 2019-03-25 09:37:03 +01:00
regex Collations with nondeterministic comparison 2019-03-22 12:12:43 +01:00
replication Add basic infrastructure for 64 bit transaction IDs. 2019-03-28 18:12:20 +13:00
rewrite tableam: Add and use scan APIs. 2019-03-11 12:46:41 -07:00
snowball Update copyright for 2019 2019-01-02 12:44:25 -05:00
statistics Minor improvements for the multivariate MCV lists 2019-03-27 20:07:41 +01:00
storage Add basic infrastructure for 64 bit transaction IDs. 2019-03-28 18:12:20 +13:00
tcop Transaction chaining 2019-03-24 11:33:02 +01:00
tsearch Move hash_any prototype from access/hash.h to utils/hashutils.h 2019-03-11 13:17:50 -03:00
utils Add basic infrastructure for 64 bit transaction IDs. 2019-03-28 18:12:20 +13:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
common.mk Remove PARTIAL_LINKING build mode. 2018-03-30 17:33:04 -07:00
Makefile Get rid of jsonpath_gram.h and jsonpath_scanner.h 2019-03-20 11:13:34 +03:00
nls.mk Translation updates 2018-06-25 12:37:18 +02:00