> 21 сент. 2020 г., в 17:15, Heikki Linnakangas <hlinn...@iki.fi> написал(а):
> 
> On 21/09/2020 12:06, Andrey M. Borodin wrote
>> 
>> I think we don't set rightlinks during index build.
> 
> The new GiST sorting code does not, but the regular insert-based code does.
> 
> That's a bit questionable in the new code actually. Was that a conscious
> decision? The right-links are only needed when there are concurrent page
> splits, so I think it's OK, but the checks for InvalidBlockNumber in
> gistScanPage() and gistFindPage() have comment "/* sanity check */".
> Comment changes are needed, at least.

It was a conscious decision with incorrect motivation. I was thinking that it 
will help to reduce number of "false positive" inspecting right pages. But now 
I see that:
1. There should be no such "false positives" that we can avoid
2. Valid rightlinks could help to do amcheck verification in future

But thing that bothers me now: when we vacuum leaf page, we bump it's NSN. But 
we do not bump internal page LSN. Does this means we will follow rightlinks 
after vacuum? It seems superflous. And btw we did not adjust internal page 
tuples after vacuum...

Best regards, Andrey Borodin.

Reply via email to