Re: Tuple hint bits (INFOMASK) upon transaction abort

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: letizia leo <letizia_leo(at)yahoo(dot)it>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Tuple hint bits (INFOMASK) upon transaction abort
Date: 2006-06-16 03:17:11
Message-ID: 12561.1150427831@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

letizia leo <letizia_leo(at)yahoo(dot)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 that the 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jaime Casanova 2006-06-16 03:20:29 alias for OLD and NEW in triggers
Previous Message Bruce Momjian 2006-06-16 03:15:28 Re: Re-thing PG_MODULE_MAGIC