Re: Prepared transactions vs novice DBAs, again

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

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Wed, Apr 22, 2009 at 2:58 PM, Heikki Linnakangas
> <heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:
>> It still does. A prepared xact is just like a idle-in-transaction backend as
>> far as vacuum is concerned.

> Is that really necessary? It's true that you can't vacuum away any
> rows whose xmin is that of the prepared xact, but it seems like you
> wouldn't need to keep rows just because they were *visible* to the
> prepared xact. Once prepared, it's no longer capable of reading them.

I think we've already milked what we can from that, since a prepared
xact is treated exactly like an open one with no snapshot. The point
is that whatever rows it's written are still in-doubt and cannot be
frozen, so the wraparound horizon cannot advance past its XID.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2009-04-22 22:26:04 pg_restore -j <nothing>
Previous Message Hiroshi Inoue 2009-04-22 21:35:28 Re: trouble with to_char('L')