Re: Prepared transactions vs novice DBAs, again

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, jd(at)commandprompt(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Prepared transactions vs novice DBAs, again
Date: 2009-04-22 19:08:50
Message-ID: 49EF6B42.9060507@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Jeff Davis wrote:
> On Wed, 2009-04-22 at 21:58 +0300, Heikki Linnakangas wrote:
>> Tom Lane wrote:
>>> Does a prepared xact still block vacuum cleanup in HEAD, or has that
>>> been fixed since 8.2?
>> It still does. A prepared xact is just like a idle-in-transaction
>> backend as far as vacuum is concerned.
>
> I thought idle transactions generally have released all their snapshots
> (where possible), thus allowing VACUUM to work. I would think something
> similar could work for prepared transactions.

If the prepared transaction has modified any rows (as it typically has,
or you wouldn't bother with 2PC to begin with), its XID is on disk. We
can't advance OldestXmin beyond that.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-04-22 19:49:32 Re: Prepared transactions vs novice DBAs, again
Previous Message Jeff Davis 2009-04-22 19:03:15 Re: Prepared transactions vs novice DBAs, again