Re: Race condition in b-tree page deletion - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Race condition in b-tree page deletion
Date
Msg-id 32194.1384014286@sss.pgh.pa.us
Whole thread Raw
In response to Race condition in b-tree page deletion  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Responses Re: Race condition in b-tree page deletion
List pgsql-hackers
Heikki Linnakangas <hlinnakangas@vmware.com> writes:
> 2. The second-simplest solution I see is to keep locked the whole chain 
> of pages that will be deleted, and delete all of them as one atomic 
> WAL-logged operation. Ie. the leaf page, and all the parent pages above 
> it that will become half-dead, and the parent of the last half-dead page.

This would be more tenable if we could put a known limit on the number of
pages to be changed at once.  I'm not too awake at the moment, so maybe
this is not possible, but could we simply decide in advance that we won't
propagate page deletion up more than a-small-number of levels?  It'd
require allowing a page to remain half-dead until some other vacuum comes
along and fixes it, but that seems OK.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Race condition in b-tree page deletion
Next
From: Heikki Linnakangas
Date:
Subject: Re: Race condition in b-tree page deletion