Skip site navigation (1) Skip section navigation (2)

Re: nested xacts and phantom Xids

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
Cc: Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: nested xacts and phantom Xids
Date: 2004-06-26 23:56:09
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackerspgsql-patches
Do we really need SubtransCutoffXid?  AFAICS the reason for having it is
only this claim in RecordTransactionCommit:

         * We can't mark committed subtransactions as fully committed,
         * because concurrent transactions would see them as committed
         * and not as in-progress.  Leave them as "subcommitted" until
         * the parent transaction is below OldestXmin, per VACUUM.

but I think this is dead wrong.  As long as we mark the parent committed
first, there is no race condition.  tqual tests that are using snapshots
will need to recognize that the subtransaction is a member of one of the
snapshotted main XIDs, and those that are not will think committed is
committed.  So I want to mark subtransactions fully committed in
RecordTransactionCommit, and lose SubtransCutoffXid.  Comments?

BTW, it would help to know what parts of the patch you intend to work on
over the next couple of days.  I'm reviewing and editorializing right
now with intent to commit soon, so it would be good if we can avoid
tromping on each others' feet.

			regards, tom lane

In response to


pgsql-hackers by date

Next:From: Scott MarloweDate: 2004-06-27 01:31:59
Subject: Re: xeon processors
Previous:From: jacob koehler (RRes-Roth)Date: 2004-06-26 20:38:35
Subject: Re: recursive SQL

pgsql-patches by date

Next:From: Alvaro HerreraDate: 2004-06-27 03:10:59
Subject: Re: nested xacts and phantom Xids
Previous:From: Greg StarkDate: 2004-06-26 18:09:53
Subject: Re: [PATCHES] nested xacts and phantom Xids

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group