Re: Skytools committed without hackers discussion/review

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Hannu Krosing <hannu(at)skype(dot)net>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, Marko Kreen <markokr(at)gmail(dot)com>, Jan Wieck <JanWieck(at)Yahoo(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Skytools committed without hackers discussion/review
Date: 2007-10-10 18:43:43
Message-ID: 21653.1192041823@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Hannu Krosing <hannu(at)skype(dot)net> writes:
> hel kenal peval, K, 2007-10-10 kell 12:18, kirjutas Tom Lane:
>> * Why is txid_current_snapshot() reading SerializableSnapshot rather
>> than an actually current snap as its name suggests?

> Why is SerializableSnapshot going away ?
> How will we do serialized isolation level in 8.4 then?

If we are in a serializable transaction, we'll keep that snap around
(though probably not stored exactly where it is now). In a Read
Committed transaction we should discard snaps that are no longer going
to be used by any subsequent query; this will allow intratransaction
advancement of xmin with ensuing benefits for VACUUM etc. (This has
been discussed repeatedly, though I'm too lazy to go searching the
archives at the moment.)

The proposed behavior of txid_current_snapshot would defeat any
possibility of such an optimization, because we'd have to keep around
the xact's oldest snapshot on the off chance that txid_current_snapshot
would be called later in the xact.

I think txid_current_snapshot should read ActiveSnapshot. If the user
wants to get a beginning-of-xact rather than beginning-of-statement
snapshot from it, he should be required to call it in a serializable
transaction.

regards, tom lane

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Florian Pflug 2007-10-10 18:55:28 Re: Skytools committed without hackers discussion/review
Previous Message Tom Lane 2007-10-10 18:30:54 Re: Skytools committed without hackers discussion/review

Browse pgsql-hackers by date

  From Date Subject
Next Message Florian Pflug 2007-10-10 18:55:28 Re: Skytools committed without hackers discussion/review
Previous Message Tom Lane 2007-10-10 18:30:54 Re: Skytools committed without hackers discussion/review