Re: [PATCH] Transaction traceability - txid_status(bigint)
Craig Ringer <craig@2ndquadrant.com>
From: Craig Ringer <craig@2ndquadrant.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Petr Jelinek <petr@2ndquadrant.com>, Simon Riggs <simon@2ndquadrant.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>, Andres Freund <andres@anarazel.de>, Jim Nasby <Jim.Nasby@bluetreble.com>, Álvaro Herrera <alvaro.herrera@2ndquadrant.com>
Date: 2017-03-20T05:38:18Z
Lists: pgsql-hackers
Attachments
- 0001-Fix-race-between-clog-truncation-and-lookup.patch (text/x-patch) patch 0001
- 0002-Introduce-txid_status-bigint-to-get-status-of-an-xac.patch (text/x-patch) patch 0002
On 14 March 2017 at 19:57, Robert Haas <robertmhaas@gmail.com> wrote: > On Mon, Mar 13, 2017 at 10:22 PM, Craig Ringer <craig@2ndquadrant.com> wrote: >> I'll introduce a new LWLock, ClogTruncationLock, which will be held >> from when we advance the new clogOldestXid field through to when clog >> truncation completes. > > +1. OK, here's the revised patch. Relevant comments added where needed. It still changes the xlog record for clog truncation to carry the new xid, but I've left advancing oldestXid until the checkpoint as is currently the case, and only advanced oldestClogXid when we replay clog truncation. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
Commits
-
Add a txid_status function.
- 857ee8e391ff 10.0 landed
-
Track the oldest XID that can be safely looked up in CLOG.
- ea42cc18c353 10.0 landed