Re: Brain dump: btree collapsing - Mailing list pgsql-hackers

From Curtis Faith
Subject Re: Brain dump: btree collapsing
Date
Msg-id 000f01c2d45e$7a949f50$a200a8c0@curtislaptop
Whole thread Raw
In response to Re: Brain dump: btree collapsing  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
tom lane wrote:
> Hmmm ... that might be made to work, but it would complicate 
> inserts. By the time an insert navigates to the page it 
> should insert on, it might find the page is dead, and then it 
> would have no easy way to get to the replacement page (unless 
> you want to dedicate another link field in every index page 
> for that one use).  I suppose it could recover by starting 
> the search over again.

Inserts could reread just the parent page if they encountered a dead
leaf since the parent would have been correctly updated.

> Another problem is that the two dead pages are now outside of 
> the btree structure and so their left and right links won't 
> get updated in the face of subsequent splits and merges of 
> the nearby pages.

That seems like a "show stopper" that just defers the problem. A split
of the left sibling would still screw up a scan that was using the old
left leaf page and wanted to move left.

Oh, well, the idea seemed worth exploring.

- Curtis





pgsql-hackers by date:

Previous
From: Kevin Brown
Date:
Subject: stats_command_string default?
Next
From: Steve Crawford
Date:
Subject: Re: location of the configuration files