Re: Free Space Map data structure

From: "Dave Page" <dpage(at)pgadmin(dot)org>
To: "Brendan Jurd" <direvus(at)gmail(dot)com>
Cc: "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Free Space Map data structure
Date: 2008-04-08 08:59:08
Message-ID: 937d27e10804080159i10e9bacckeeb7404ec5374835@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Apr 8, 2008 at 9:54 AM, Brendan Jurd <direvus(at)gmail(dot)com> wrote:
> If I understand your design correctly, this claim isn't true. If the
> topmost node reports 9 bytes free, could you not have seven pages each
> with 1 byte free, and an eighth page with 2 bytes free?
>
> 9
> 4 5
> 2 2 2 3
> 1 1 1 1 1 1 1 2
>
> So you'd actually end up walking two levels down the left hand side of
> the tree, discovering not enough space, and then walking two levels
> down the right hand side to again discover not enough space.

As I read it, each node takes the value of the largest child, not the
sum of the children.

--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Zoltan Boszormenyi 2008-04-08 09:09:39 Re: [HACKERS] TRUNCATE TABLE with IDENTITY
Previous Message Brendan Jurd 2008-04-08 08:54:43 Re: Free Space Map data structure