Re: Yet another fast GiST build - Mailing list pgsql-hackers

From Andrey M. Borodin
Subject Re: Yet another fast GiST build
Date
Msg-id 0A1DDF47-CAB7-4D6A-9677-B1800FFB6984@yandex-team.ru
Whole thread Raw
In response to Re: Yet another fast GiST build  (Heikki Linnakangas <hlinnaka@iki.fi>)
Responses Re: Yet another fast GiST build  ("Andrey M. Borodin" <x4mmm@yandex-team.ru>)
Re: Yet another fast GiST build  (Heikki Linnakangas <hlinnaka@iki.fi>)
List pgsql-hackers

> 21 сент. 2020 г., в 17:15, Heikki Linnakangas <hlinnaka@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
thismeans we will follow rightlinks after vacuum? It seems superflous. And btw we did not adjust internal page tuples
aftervacuum... 

Best regards, Andrey Borodin.


pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Logical replication from PG v13 and below to PG v14 (devel version) is not working.
Next
From: Alvaro Herrera
Date:
Subject: Re: Inconsistent Japanese name order in v13 contributors list