Re: Tuple hint bits (INFOMASK) upon transaction abort - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Tuple hint bits (INFOMASK) upon transaction abort
Date
Msg-id 12561.1150427831@sss.pgh.pa.us
Whole thread Raw
In response to Tuple hint bits (INFOMASK) upon transaction abort  (letizia leo <letizia_leo@yahoo.it>)
List pgsql-hackers
letizia leo <letizia_leo@yahoo.it> writes:
>  Transaction T1 updates a given tuple -- xmax is set to T1 on that tuple
>  ...
>  later on, T1 aborts... we believe that in this circumstance HEAP_XMAX_INVALID should be set on the tuple to signal
thatthe tuple was not actually "deleted" by T1 since this aborted.
 

Right.  It is not T1's responsibility to do this, however.  Rather, the
next transaction that examines the tuple will set the bit.  That is
exactly the same as if T1 commits: it doesn't set XMAX_COMMITTED, the
next inspector of the tuple does.

To make this work, the pg_clog entry that says whether T1 committed or
aborted must be kept until all tuples modified by T1 have certainly been
marked as COMMITTED or INVALID.  VACUUM is set up to track that.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Re-thing PG_MODULE_MAGIC
Next
From: "Jaime Casanova"
Date:
Subject: alias for OLD and NEW in triggers