Re: vacuum on table1 skips rows because of a query on table2

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: vacuum on table1 skips rows because of a query on table2
Дата
Msg-id 19474.1572022017@sss.pgh.pa.us
обсуждение исходный текст
Ответ на vacuum on table1 skips rows because of a query on table2  (Virender Singla <virender.cse@gmail.com>)
Ответы Re: vacuum on table1 skips rows because of a query on table2
Список pgsql-hackers
Virender Singla <virender.cse@gmail.com> writes:
> Currently I see the vacuum behavior for a table is that, even if a long
> running query on a different table is executing in another read committed
> transaction.
> That vacuum in the 1st transaction skips the dead rows until the long
> running query finishes.
> Why that is the case, On same table long running query blocking vacuum we
> can understand but why query on a different table block it.

Probably because vacuum's is-this-row-dead-to-everyone tests are based
on the global xmin minimum.  This must be so, because even if the
long-running transaction hasn't touched the table being vacuumed,
we don't know that it won't do so in future.  So we can't remove
rows that it should be able to see if it were to look.

            regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [Proposal] Arbitrary queries in postgres_fdw
Следующее
От: Tom Lane
Дата:
Сообщение: Re: define bool in pgtypeslib_extern.h