pgsql: Provide XLogRecGetFullXid(). - Mailing list pgsql-committers

From Thomas Munro
Subject pgsql: Provide XLogRecGetFullXid().
Date
Msg-id E1hmtDZ-0005GD-5g@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Provide XLogRecGetFullXid().

In order to be able to work with FullTransactionId values during replay
without increasing the size of the WAL, infer the epoch.  In general we
can't do that safely, but during replay we can because we know that
nextFullXid can't advance concurrently.

Prevent frontend code from seeing this new function, due to the above
restriction.  Perhaps in future it will be possible to extract the value
entirely from independent WAL records, and then this restriction can be
lifted.

Author: Thomas Munro, based on earlier code from Andres Freund
Discussion: https://postgr.es/m/CA%2BhUKG%2BmLmuDjMi6o1dxkKvGRL56Y2Rz%2BiXAcrZV03G9ZuFQ8Q%40mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/67b9b3ca328392f9afc4e66fe03564f5fc87feff

Modified Files
--------------
src/backend/access/transam/xlogreader.c | 35 +++++++++++++++++++++++++++++++++
src/include/access/xlogreader.h         |  8 ++++++++
2 files changed, 43 insertions(+)


pgsql-committers by date:

Previous
From: Peter Eisentraut
Date:
Subject: pgsql: Add gen_random_uuid function
Next
From: Tom Lane
Date:
Subject: pgsql: Represent Lists as expansible arrays, not chains of cons-cells.