Re: Skytools committed without hackers discussion/review
От | Tom Lane |
---|---|
Тема | Re: Skytools committed without hackers discussion/review |
Дата | |
Msg-id | 21653.1192041823@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Skytools committed without hackers discussion/review (Hannu Krosing <hannu@skype.net>) |
Ответы |
Re: Skytools committed without hackers discussion/review
|
Список | pgsql-hackers |
Hannu Krosing <hannu@skype.net> 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 transaction. regards, tom lane
В списке pgsql-hackers по дате отправления: