Re: Free Space Map thoughts

From: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
To: alvherre(at)commandprompt(dot)com
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Free Space Map thoughts
Date: 2007-11-09 13:27:10
Message-ID: 4734602E.3050300@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alvaro Herrera wrote:
> One idea is to have the first FSM page be movable, and create it by
> extending the table when as soon as it's first "needed" (this would be
> the first vacuum that needs to record free space on the table). The
> page number used is recorded in the relcache entry (and pg_class).
> Further FSM pages use a fixed position. If the table grows beyond the
> first fixed position before creating the first FSM page, reserve that
> one for the first FSM page and record that.

It wouldn't need to be movable. We could just allocate the first FSM
page when the table grows bigger than say 10 pages. The first FSM page
would always be at block 11, and it could store the free space
information for pages 0-10 as well.

I'm not particularly worried about the bloat on small tables, though. If
a table that used to take 8k bytes now takes 16k, who cares. You
wouldn't need to load the FSM pages to shared buffers unless the FSM is
actually used.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2007-11-09 13:28:08 Re: New tzdata available
Previous Message Zdenek Kotala 2007-11-09 13:23:10 Re: New tzdata available