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

From Heikki Linnakangas
Subject Re: Race condition in b-tree page deletion
Date
Msg-id 52E66F97.9090804@vmware.com
Whole thread Raw
In response to Re: Race condition in b-tree page deletion  (Jim Nasby <jim@nasby.net>)
List pgsql-hackers
On 12/17/2013 04:55 AM, Jim Nasby wrote:
> On 11/9/13, 10:02 AM, Heikki Linnakangas wrote:
>> 3. Another approach would be to get rid of the "can't delete
>> rightmost child" limitation. We currently have that limitation
>> because it ensures that we never need to change the high-key of a
>> page. If we delete a page that is the rightmost child of its
>> parent, we transfer the deleted keyspace from the parent page to
>> its right sibling. To do that, we need to update the high key of
>> the parent, as well as the downlink of the right sibling at the
>> grandparent level. That's a bit complicated, because updating the
>> high key might require splitting the page.
>
> Is the rightmost child issue likely to affect indexes on increasing
> values, like a queue table?

No. In a FIFO queue, you keep adding new items to the right-end of the 
index, so old pages become non-rightmost fairly quickly.

- Heikki



pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: Custom Scan APIs (Re: Custom Plan node)
Next
From: Robert Haas
Date:
Subject: Re: shouldn't we log permission errors when accessing the configured trigger file?