Re: Do not check unlogged indexes on standby
x4mmm@yandex-team.ru
From: Andrey Borodin <x4mmm@yandex-team.ru>
To: Peter Geoghegan <pg@bowt.ie>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2019-08-15T13:57:30Z
Lists: pgsql-hackers
Attachments
- 0001-In-amcheck-nbtree-do-rightlink-verification-with-loc.patch (application/octet-stream) patch 0001
> 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.
Commits
-
amcheck: Skip unlogged relations during recovery.
- 6754fe65a4c6 13.0 landed
- a05fa2c0e775 12.0 landed
- 4f393793f7d6 11.6 landed
- f8d2cdc12c94 10.11 landed