Re: Do not check unlogged indexes on standby

Поиск
Список
Период
Сортировка
От Andrey Borodin
Тема Re: Do not check unlogged indexes on standby
Дата
Msg-id DE1A3088-C2D7-436D-99BB-9C44F56C8F57@yandex-team.ru
обсуждение исходный текст
Ответ на Re: Do not check unlogged indexes on standby  (Peter Geoghegan <pg@bowt.ie>)
Ответы Re: Do not check unlogged indexes on standby  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-hackers

> 13 авг. 2019 г., в 20:30, Peter Geoghegan <pg@bowt.ie> написал(а):
>
> That's one possibility. When I first designed amcheck it was important
> to be conservative, so I invented a general rule about never acquiring
> multiple buffer locks at once. I still think that that was the correct
> decision for the bt_downlink_check() check (the main extra
> bt_index_parent_check() check), but I think that you're right about
> retrying to verify the sibling links when bt_index_check() is called
> from SQL.
>
> nbtree will often "couple" buffer locks on the leaf level; it will
> acquire a lock on a leaf page, and not release that lock until it has
> also acquired a lock on the right sibling page (I'm mostly thinking of
> _bt_stepright()). I am in favor of a patch that makes amcheck perform
> sibling link verification within bt_index_check(), by retrying while
> pessimistically coupling buffer locks. (Though I think that that
> should just happen on the leaf level. We should not try to be too
> clever about ignorable/half-dead/deleted pages, to be conservative.)

PFA V1 of this check retry.

Best regards, Andrey Borodin.

Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Don't like getObjectDescription results for pg_amop/pg_amproc
Следующее
От: Sergei Kornilov
Дата:
Сообщение: Re: Change ereport level for QueuePartitionConstraintValidation