Re: Corrupt index stopping autovacuum system wide - Mailing list pgsql-general

From Peter Geoghegan
Subject Re: Corrupt index stopping autovacuum system wide
Date
Msg-id CAH2-Wzkgf76FjnGQk=DAmjhk1Pok-uybb_4Lk64XyGGVeue64g@mail.gmail.com
Whole thread Raw
In response to Re: Corrupt index stopping autovacuum system wide  (Peter Geoghegan <pg@bowt.ie>)
Responses Re: Corrupt index stopping autovacuum system wide  (Peter Geoghegan <pg@bowt.ie>)
List pgsql-general
On Wed, Jul 17, 2019 at 9:21 AM Peter Geoghegan <pg@bowt.ie> wrote:
> It's possible that amcheck would have given you an accurate diagnosis
> of the problem -- especially if you used bt_index_parent_check():
>
> https://www.postgresql.org/docs/current/amcheck.html

BTW, be sure to use the 'heapallindexed' option with
bt_index_parent_check() to detect missing downlinks, which is exactly
the problem that VACUUM complained about. Hopefully this probably will
be limited to the single index that you've already REINDEXed. In
theory the same problem could be hiding in other indexes, though I
don't consider that particularly likely.

Note that bt_index_parent_check() requires a lock on tables that
effectively blocks writes, but not reads, so verification may require
planning or coordination. bt_index_check() doesn't have any of these
problems, but also won't detect missing downlinks specifically.

-- 
Peter Geoghegan



pgsql-general by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: Corrupt index stopping autovacuum system wide
Next
From: Tom Lane
Date:
Subject: Re: Corrupt index stopping autovacuum system wide