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>
Date: 2016-12-21T23:49:40Z
Lists: pgsql-hackers
On 22 December 2016 at 00:30, Robert Haas <robertmhaas@gmail.com> wrote: > That makes everything that happens between when we acquire that lock > and when we release it non-interruptible, which seems undesirable. I > think that extra copy of oldestXid is a nicer approach. That's a side-effect I didn't realise. Given that, yes, I agree. Since we don't truncate clog much, do you think it's reasonable to just take XidGenLock again before we proceed? I'm reluctant to add another acquisition of a frequently contested lock for something 99.9% of the codebase won't care about, so I think it's probably better to add a new LWLock, and I'll resubmit on that basis, but figure it's worth asking. -- 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