Re: lazy vacuum sleeps with exclusive lock on table

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: lazy vacuum sleeps with exclusive lock on table
Дата
Msg-id 26498.1185459217@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: lazy vacuum sleeps with exclusive lock on table  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-hackers
Alvaro Herrera <alvherre@commandprompt.com> writes:
> I propose applying this patch from 8.1 onwards.  HEAD would get an
> additional treatment to avoid the balancing problem.

If you're going to insert an early unlock, it should be as early as
possible, ie right after the RelationTruncate() call.  The bookkeeping
in between is probably trivial, but why hold the lock for it?

Also, rather than just removing the vacuum_delay_point call, you need
a comment explicitly pointing out why that loop hasn't got one.
Otherwise somebody will think it an oversight and put it back in
someday.
        regards, tom lane


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

Предыдущее
От: Greg Smith
Дата:
Сообщение: Re: Machine available for community use
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Machine available for community use