Re: decoupling table and index vacuum

Поиск
Список
Период
Сортировка
От Masahiko Sawada
Тема Re: decoupling table and index vacuum
Дата
Msg-id CAD21AoCdy7M1STR7BEE-o1YWWzAB0vdZufoXSOa6qObB6nD7MA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: decoupling table and index vacuum  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: decoupling table and index vacuum
Список pgsql-hackers
On Thu, May 6, 2021 at 7:19 PM Robert Haas <robertmhaas@gmail.com> wrote:
>
> On Thu, May 6, 2021 at 5:02 AM Masahiko Sawada <sawada.mshk@gmail.com> wrote:
> > Not sure we will need to hold buffer locks for both the TID fork and
> > the heap at the same time but I agree that we could need to lock on
> > multiple TID fork buffers. We could need to add dead TIDs to up to two
> > pages for the TID fork during replaying XLOG_HEAP2_PRUNE since we
> > write it per heap pages. Probably we can process one by one.
>
> It seems like we do need to hold them at the same time, because
> typically for a WAL record you lock all the buffers, modify them all
> while writing the WAL record, and then unlock them all.
>
> Now maybe there's some argument that we can dodge that requirement
> here, but I have reservations about departing from the usual locking
> pattern. It's easier to reason about the behavior when everybody
> follows the same set of rules.

Yes, agreed. I was thinking of replaying WAL, not writing WAL.

Regards,

--
Masahiko Sawada
EDB:  https://www.enterprisedb.com/



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

Предыдущее
От: Thomas Munro
Дата:
Сообщение: Anti-critical-section assertion failure in mcxt.c reached by walsender
Следующее
От: Robert Haas
Дата:
Сообщение: Re: [bug?] Missed parallel safety checks, and wrong parallel safety