Re: Multiple FPI_FOR_HINT for the same block during killing btreeindex items

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Multiple FPI_FOR_HINT for the same block during killing btreeindex items
Дата
Msg-id 20200409180533.GA16651@alvherre.pgsql
обсуждение исходный текст
Ответ на Multiple FPI_FOR_HINT for the same block during killing btree index items  (Masahiko Sawada <masahiko.sawada@2ndquadrant.com>)
Список pgsql-hackers
On 2020-Apr-09, Masahiko Sawada wrote:

> The inner test in the comment "found the item" never tests the item
> for being dead. So maybe we can add !ItemIdIsDead(iid) to that
> condition. But there still is a race condition of recording multiple
> FPIs can happen. Maybe a better solution is to change the lock to
> exclusive, at least when wal_log_hints = on, so that only one process
> can run this code -- the reduction in concurrency might be won back by
> the fact that we don't wal-log the page multiple times.

I agree.

It seems worth pointing out that when this code was written, these hint
bit changes were not logged, so this consideration did not apply then.
But we added data checksums and wal_log_hints, which changed the
equation.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



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

Предыдущее
От: Tim Bishop
Дата:
Сообщение: Re: debian bugrept involving fast default crash in pg11.7
Следующее
От: Alexey Kondratov
Дата:
Сообщение: Re: [HACKERS] make async slave to wait for lsn to be replayed