Hannu Krosing <[EMAIL PROTECTED]> writes:
> Ãhel kenal pÃ¤eval, 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
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly