Re: Autovacuum of independent tables

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Autovacuum of independent tables
Дата
Msg-id 1768409.1599578158@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Autovacuum of independent tables  (Magnus Hagander <magnus@hagander.net>)
Ответы Re: Autovacuum of independent tables  (Magnus Hagander <magnus@hagander.net>)
Re: Autovacuum of independent tables  (Michael Holzman <michaelholzman@gmail.com>)
Список pgsql-general
Magnus Hagander <magnus@hagander.net> writes:
> On Tue, Sep 8, 2020 at 4:38 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> The reason that's not so is that whether or not transaction A *has*
>> touched table B is irrelevant.  It *could* read table B at any moment,
>> for all autovacuum knows.  Therefore we cannot remove rows that should
>> still be visible to A's snapshot.

> Right. But in the default isolation level, the snapshot of A gets reset
> between each SELECT, and does not persist to the end of the transaction.

Well, we don't know what isolation level the OP is using.  We also don't
know what PG version he's using.  From memory, it hasn't been that long
since we fixed things so that an idle read-committed transaction
advertises no xmin.  It's also possible that the transaction isn't really
idle between statements (eg, if it's holding open cursors, or the like).

            regards, tom lane



В списке pgsql-general по дате отправления:

Предыдущее
От: Michael Holzman
Дата:
Сообщение: Re: Autovacuum of independent tables
Следующее
От: Magnus Hagander
Дата:
Сообщение: Re: Autovacuum of independent tables