Re: amcheck verification for GiST - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: amcheck verification for GiST
Date
Msg-id 2ff57b1f-01b4-eacf-36a2-485a12017f6e@iki.fi
Whole thread Raw
In response to Re: amcheck verification for GiST  (Heikki Linnakangas <hlinnaka@iki.fi>)
List pgsql-hackers
On 04/03/2019 17:53, Heikki Linnakangas wrote:
> I tested this patch with your testing patch from the other thread (after
> fixing the above), to leave behind incompletely split pages [1]. It
> seems that the amcheck code doesn't expect incomplete splits:
> 
> postgres=# SELECT gist_index_parent_check('x_c_idx');
> ERROR:  index "x_c_idx" has inconsistent records

On closer look, I think that was because that testing patch to leave 
behind incomplete splits really did corrupt the index. It always 
inserted the downlink to the parent, but randomly skipped clearing the 
FOLLOW_RIGHT flag and updating the NSN in the child. That's not a valid 
combination. To test incomplete splits, you need to skip inserting the 
downlink to the parent, too.

- Heikki


pgsql-hackers by date:

Previous
From: tushar
Date:
Subject: Re: Minimal logical decoding on standbys
Next
From: Rahila
Date:
Subject: Re: monitoring CREATE INDEX [CONCURRENTLY]