Re: pg_freespacemap question

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp>
Cc: markir(at)paradise(dot)net(dot)nz, peter_e(at)gmx(dot)net, pgsql-hackers(at)postgresql(dot)org, tgl(at)sss(dot)pgh(dot)pa(dot)us
Subject: Re: pg_freespacemap question
Date: 2006-03-07 23:49:24
Message-ID: 20060307234924.GA9838@surnet.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jonah H. Harris 2006-03-08 01:28:17 Re: Merge algorithms for large numbers of "tapes"
Previous Message Tatsuo Ishii 2006-03-07 23:42:13 Re: pg_freespacemap question

Browse pgsql-patches by date

  From Date Subject
Next Message David Fetter 2006-03-08 00:36:04 Re: variance aggregates per SQL:2003
Previous Message Tatsuo Ishii 2006-03-07 23:42:13 Re: pg_freespacemap question