Re: Race condition in b-tree page deletion

From: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
To: Jim Nasby <jim(at)nasby(dot)net>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Race condition in b-tree page deletion
Date: 2014-01-27 14:39:19
Message-ID: 52E66F97.9090804@vmware.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2014-01-27 14:39:34 Re: Custom Scan APIs (Re: Custom Plan node)
Previous Message Heikki Linnakangas 2014-01-27 14:34:44 Re: Race condition in b-tree page deletion