Re: Nested transactions and tuple header info - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Nested transactions and tuple header info
Date
Msg-id 24590.1086189151@sss.pgh.pa.us
Whole thread Raw
In response to Re: Nested transactions and tuple header info  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: Nested transactions and tuple header info
Re: Nested transactions and tuple header info
List pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> I don't understand why a single counter is needed for phantom xids.  We
> keep the cmin/cmax on the tuple already, and our own backend can look up
> the xmin/xmax that goes with the phantom.

Oh, so you're thinking of an internal table that provides a mapping back
to the replaced xmin?  Ugh.  Perhaps it could be made to work, but it's
a lot of mechanism, and it will slow down visibility checks (since
AFAICS you'd have to check every subxid against the phantoms table).
If we go with a global CID counter then we don't have to add that step.

A global CID counter would also simplify other visibility tests.  Alvaro
hasn't said anything about how he's doing visibility checks across
different subxacts of the same main xact, but without global CID there
would need to be some pretty ugly checks to determine whether a subxact
happened before or after the CID cutoff your outer xact is interested
in.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: ACLs versus ALTER OWNER
Next
From: Bruce Momjian
Date:
Subject: Re: Nested transactions and tuple header info