Re: pg_freespacemap question - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: pg_freespacemap question
Date
Msg-id 20060307234924.GA9838@surnet.cl
Whole thread Raw
In response to Re: pg_freespacemap question  (Tatsuo Ishii <ishii@sraoss.co.jp>)
List pgsql-hackers
Tatsuo Ishii wrote:

> Just for curiousity, why FSM gathers info for indexes? I thought FSM
> is only good for tables.

It's part of the implementation of the page-recycling algorithm for
btrees Tom did for 7.4.  When a btree page is empty after a vacuum, it's
entered in the free space map.  When a page is split, the new page is
taken from the FSM (or the relation is extended if there isn't any.)

That's why the bytes-free number is zero: when a btree page makes it
into the FSM, we are sure it's completely empty.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


pgsql-hackers by date:

Previous
From: Tatsuo Ishii
Date:
Subject: Re: pg_freespacemap question
Next
From: "Jonah H. Harris"
Date:
Subject: Re: Merge algorithms for large numbers of "tapes"