Re: Corrupted btree index on HEAD because of covering indexes

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Teodor Sigaev <teodor@sigaev.ru>
Cc: Peter Geoghegan <pg@bowt.ie>, Postgres hackers <pgsql-hackers@postgresql.org>, Anastasia Lubennikova <a.lubennikova@postgrespro.ru>
Date: 2018-04-20T01:27:50Z
Lists: pgsql-hackers
On Thu, Apr 19, 2018 at 10:47:02PM +0300, Teodor Sigaev wrote:
> I tried to minimize Michael's test case and add it to patch.

I cannot comment on the actual fix as I lack background in the area, but
having a test case and even more having pg_upgrade do some work on those
pages are good things.  This addresses the failure as far as I can see.
--
Michael

Commits

  1. Add missing and dangling downlink checks to amcheck

  2. Fix wrong validation of top-parent pointer during page deletion in Btree.

  3. Add integrity-checking functions to pg_visibility.

  4. Make the handling of interrupted B-tree page splits more robust.