Re: Tuple visibility within a single XID

Поиск
Список
Период
Сортировка
Искать
От
Qingqing Zhou
Тема
Re: Tuple visibility within a single XID
Дата
Msg-id
CAJjS0u3_WG0JENwQ6MNFGXsWSj=fnPtma9ry_qmzZhorw1t-kw@mail.gmail.com
Ответ на
Список
Дерево обсуждения
Tuple visibility within a single XID Jim Nasby <Jim.Nasby@BlueTreble.com>
Re: Tuple visibility within a single XID Peter Geoghegan <pg@heroku.com>
Re: Tuple visibility within a single XID Jim Nasby <Jim.Nasby@BlueTreble.com>
Re: Tuple visibility within a single XID Qingqing Zhou <zhouqq.postgres@gmail.com>
Re: Tuple visibility within a single XID Tom Lane <tgl@sss.pgh.pa.us>
Re: Tuple visibility within a single XID Peter Geoghegan <pg@heroku.com>
On Tue, Apr 7, 2015 at 6:11 PM, Peter Geoghegan  wrote:
> No. For one thing, unique index enforcement still requires the tuples
> to be treated as a conflict while the other transaction is running
> IMV.
>

Not sure if I understand correctly: in uniqueness check, we see all
possible tuples with a dirty snapshot.  For a tuple version inserted
and updated by myself, it is surely dead no matter how the transaction
ends. So I interpret that we can safely pruning the version.

Early pruning may cause some behavior change though. For example, here is a T1:

begin;  -- loop the following statements many times  insert into pk values (1);  -- uniqueness defined  delete from pk;
abort;

If another transaction T2 coming later than T1, and if we prune early,
then T1 can suddenly hang on insertion waiting for T2 to complete. But
does this violate any isolation rule?
Thanks,
Qingqing


В списке pgsql-hackers по дате отправления
От: Michael Paquier
Дата:
От: Fujii Masao
Дата:
Сообщение: Re: pg_rewind and log messages
FAQ