|From:||Andrey Borodin <x4mmm(at)yandex-team(dot)ru>|
|To:||Peter Geoghegan <pg(at)bowt(dot)ie>|
|Subject:||Re: Do not check unlogged indexes on standby|
|Views:||Raw Message | Whole Thread | Download mbox | Resend email|
> 13 авг. 2019 г., в 20:30, Peter Geoghegan <pg(at)bowt(dot)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.
|Next Message||Sergei Kornilov||2019-08-15 14:48:55||Re: Change ereport level for QueuePartitionConstraintValidation|
|Previous Message||Tom Lane||2019-08-15 13:48:00||Re: Don't like getObjectDescription results for pg_amop/pg_amproc|