Re: GiST VACUUM - Mailing list pgsql-hackers

From Andrey Borodin
Subject Re: GiST VACUUM
Date
Msg-id FD68CBB1-716F-4344-9E3F-C27C14B8678B@yandex-team.ru
Whole thread Raw
In response to Re: GiST VACUUM  (Heikki Linnakangas <hlinnaka@iki.fi>)
Responses Re: GiST VACUUM  (Heikki Linnakangas <hlinnaka@iki.fi>)
List pgsql-hackers
> 5 марта 2019 г., в 18:21, Heikki Linnakangas <hlinnaka@iki.fi> написал(а):
>
> On 05/03/2019 02:26, Andrey Borodin wrote:
>>
>> That's cool! I'll work on 2nd step of these patchset to make
>> blockset data structure prettier and less hacky.
>
> Committed the first patch. Thanks for the patch!

That's cool! Thanks!

> I'll change the status of this patch to "Waiting on Author", to reflect the state of the 2nd patch, since you're
workingon the radix tree blockset stuff. 

Here's new version of the patch for actual page deletion.
Changes:
1. Fixed possible concurrency issue:
We were locking child page while holding lock on internal page. Notes in GiST README recommend locking child before
parent.
Thus now we unlock internal page before locking children for deletion, and lock it again, check that everything is
stillon it's place and delete only then. 
One thing still bothers me. Let's assume that we have internal page with 2 deletable leaves. We lock these leaves in
orderof items on internal page. Is it possible that 2nd page have follow-right link on 1st and someone will lock 2nd
page,try to lock 1st and deadlock with VACUUM? 
2. Added radix-tree-based block set to lib, with tests.

Best regards, Andrey Borodin.

Attachment

pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: proposal: plpgsql pragma statement
Next
From: Andrey Borodin
Date:
Subject: Re: Covering GiST indexes