Re: PATCH to allow concurrent VACUUMs to not lock each

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: PATCH to allow concurrent VACUUMs to not lock each
Дата
Msg-id 20060730191834.GA9229@surnet.cl
обсуждение исходный текст
Ответ на Re: PATCH to allow concurrent VACUUMs to not lock each  (Hannu Krosing <hannu@skype.net>)
Список pgsql-patches
Hannu Krosing wrote:
> Ühel kenal päeval, P, 2006-07-30 kell 14:11, kirjutas Alvaro Herrera:

> > What was idea behind moving vac_update_relstats to a separate
> > transaction?  I'm wondering if it's still needed, if it further enhances
> > the system somehow, or your patch did something differently than what
> > was applied.
>
> The part of transactions which actually modified the data (iirc it updates
> relpages and reltuples in pg_class) is not safe to ignore by concurrent
> vacuum, say a vacuum on pg_class .
>
> When the updating is done in the same trx that marks itself inVacuum,
> then these vacuums would be permitted to remove the old versions of
> pg_class and then, in case the inVacuum transaction aborts after that we
> are left with no valid pg_class row.

I understand.  But the pg_class row is updated using in-place update,
which means that it continues having the same Xmin as before -- to the
rest of the system, it's exactly the same row as before, and it won't be
removed.  So this is not a problem.  Thanks for clarifying.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

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

Предыдущее
От: Hannu Krosing
Дата:
Сообщение: Re: PATCH to allow concurrent VACUUMs to not lock each
Следующее
От: Tom Lane
Дата:
Сообщение: Re: PATCH to allow concurrent VACUUMs to not lock each