Re: Tuples inserted and deleted by the same transaction
От
Matthias van de Meent
Тема
Re: Tuples inserted and deleted by the same transaction
Дата
Msg-id
CAEze2WgC=fHQ-9MB-015C_GgSsiy2wm5oz1O5+H1_346XWXQ6w@mail.gmail.com
Ответ на
Список
Дерево обсуждения
Tuples inserted and deleted by the same transaction Laurenz Albe <laurenz.albe@cybertec.at>
Re: Tuples inserted and deleted by the same transaction Nikita Malakhov <hukutoc@gmail.com>
Re: Tuples inserted and deleted by the same transaction Laurenz Albe <laurenz.albe@cybertec.at>
Re: Tuples inserted and deleted by the same transaction Tom Lane <tgl@sss.pgh.pa.us>
Re: Tuples inserted and deleted by the same transaction Matthias van de Meent <boekewurm+postgres@gmail.com>
Re: Tuples inserted and deleted by the same transaction Laurenz Albe <laurenz.albe@cybertec.at>
Re: Tuples inserted and deleted by the same transaction Pantelis Theodosiou <ypercube@gmail.com>
Re: Tuples inserted and deleted by the same transaction Matthias van de Meent <boekewurm+postgres@gmail.com>
Re: Tuples inserted and deleted by the same transaction Matthias van de Meent <boekewurm+postgres@gmail.com>
On Tue, 13 Sept 2022 at 15:45, Tom Lane wrote: > > Laurenz Albe writes: > > But once they are deleted or updated, even the transaction that created them cannot > > see them any more, right? > > I would not trust that claim very far. The transaction might have active > snapshots with a command ID between the times of insertion and deletion. > (Consider a query that is firing triggers as it goes, and the triggers > are performing new actions that cause the command counter to advance. > The outer query should not see the results of those actions.) I hadn't realized that triggers indeed consume command ids but might not be visible to the outer query (that might still be running). That invalidates the "or (e.g.) the existence of another tuple with the same XID but with a newer CID" claim I made earlier, so thanks for clarifying. Kind regards, Matthias van de Meent
В списке pgsql-hackers по дате отправления
От: Peter Eisentraut
Дата: