Re: Do not check unlogged indexes on standby

From: Andrey Borodin <x4mmm(at)yandex-team(dot)ru>
To: Peter Geoghegan <pg(at)bowt(dot)ie>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Do not check unlogged indexes on standby
Date: 2019-08-15 13:57:30
Message-ID: DE1A3088-C2D7-436D-99BB-9C44F56C8F57@yandex-team.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> 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.

Attachment Content-Type Size
0001-In-amcheck-nbtree-do-rightlink-verification-with-loc.patch application/octet-stream 3.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
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