Re: Prepared transactions vs novice DBAs, again

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Prepared transactions vs novice DBAs, again
Дата
Msg-id 603c8f070904221821t30e1991cqba924c47df007f05@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Prepared transactions vs novice DBAs, again  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Prepared transactions vs novice DBAs, again  (Robert Haas <robertmhaas@gmail.com>)
Re: Prepared transactions vs novice DBAs, again  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Wed, Apr 22, 2009 at 8:58 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
>> On Wed, Apr 22, 2009 at 5:44 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> 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.
>
>> But surely that's not "the same" as a backend which is
>> idle-in-transaction?  In that case I think you still need a snapshot?
>
> No; at least not unless it's a serializable transaction.  That's the
> point of the snapshot management work that Alvaro did for 8.4.

Maybe I'm just dumb, but I don't get it.  If I start a transaction and
do "SELECT * FROM foo" and then wait around for an hour or two while
someone else makes changes to foo and then do "SELECT * FROM foo"
again, I expect to see the same rows I saw the first time, which means
they still need to be around.

But if I now do "PREPARE TRANSACTION", it's no longer necessary for
those rows to be retained, because it's not possible for me to look at
them again.

Is this the commit you're talking about?

http://archives.postgresql.org/pgsql-committers/2008-05/msg00220.php

...Robert


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Prepared transactions vs novice DBAs, again
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: pg_restore -j