Tuple visibility within a single XID

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: <pgsql-hackers(at)postgresql(dot)org>
Subject: Tuple visibility within a single XID
Date: 2015-04-08 00:59:26
Message-ID: 55247D6E.3030906@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

My understanding is that all subtransactions get their own unique XID
(assuming they need one), and that CommandId can't move backwards within
a transaction. If that's correct, then shouldn't we be able to prune
tuples where XMIN and XMAX match our *exact* XID (not all the extra
stuff that TransactionIdIsCurrentTransactionId() does) and CommandId <
CurrentCommandId?

I thought of this because of a post to -general. It's certainly not a
common case, but it seems like there's not much downside...
--
Jim Nasby, Data Architect, Blue Treble Consulting
Data in Trouble? Get it in Treble! http://BlueTreble.com

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2015-04-08 01:11:35 Re: Tuple visibility within a single XID
Previous Message Fabrízio de Royes Mello 2015-04-07 23:52:07 Re: Doubt about AccessExclusiveLock in ALTER TABLE .. SET ( .. );