Skip site navigation (1) Skip section navigation (2)

Re: Unsplitting btree index leaf pages

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Unsplitting btree index leaf pages
Date: 2005-12-22 00:07:23
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Simon Riggs <simon(at)2ndquadrant(dot)com> writes:
> While we scan, if we found two adjacent pages, both of which have less
> than (say) 40% rows, we could re-join or "unsplit" those pages together.

Curiously enough, this has been thought of before.  It is not as easy
as you think, or it would have been done the first time around.
nbtree/README explains why:

: We consider deleting an entire page from the btree only when it's become
: completely empty of items.  (Merging partly-full pages would allow better
: space reuse, but it seems impractical to move existing data items left or
: right to make this happen --- a scan moving in the opposite direction
: might miss the items if so.  We could do it during VACUUM FULL, though.)

			regards, tom lane

In response to


pgsql-hackers by date

Next:From: Manfred KoizarDate: 2005-12-22 00:43:34
Subject: Re: Re: Which qsort is used
Previous:From: Simon RiggsDate: 2005-12-22 00:00:27
Subject: Unsplitting btree index leaf pages

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group