Re: TODO-Item: B-tree fillfactor control - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: TODO-Item: B-tree fillfactor control
Date
Msg-id 200602011745.k11HjBn02927@candle.pha.pa.us
Whole thread Raw
In response to TODO-Item: B-tree fillfactor control  (ITAGAKI Takahiro <itagaki.takahiro@lab.ntt.co.jp>)
Responses Re: TODO-Item: B-tree fillfactor control  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: TODO-Item: B-tree fillfactor control  (ITAGAKI Takahiro <itagaki.takahiro@lab.ntt.co.jp>)
List pgsql-hackers
ITAGAKI Takahiro wrote:
> Hi Hackers,
> 
> I'm trying the following TODO item:
>   [Indexes]
>     - Add fillfactor to control reserved free space during index creation 
> 
> I have already made an patch and it seemed to work well.

Great.

> And now, I need advice on some issues.
> 
> - Is it appropriate to use GUC variables to control fillfactors?
>     Is it better to extend CREATE INDEX / REINDEX grammar?

I think it has to be part of CREATE INDEX and ALTER INDEX.

Is there a use for separate node and leaf settings?

This patch needs documentation, and if we have separate items, we are
going to have to explain when to use node or leaf.

> - Should indexes remember their fillfactors when they are created?
>     The last fillfactors will be used on next reindex.

They should remember, for sure, and REINDEX should use it.  It think
this is similar to the ALTER TABLE ALTER [ COLUMN ] ... SET STATISTICS 
functionality.  It will need to be dumped as well by pg_dump.  If you
need help with any of this, let me know.

> - Is fillfactor useful for hash and gist indexes?
>     I think hash does not need it, but gist might need it.

Not sure.  We don't know what type of index a GIST will be so we have no
way of knowing.  I am thinking we can implement just btree now and the
GIST folks can add it later if they want.  My guess is that each GIST is
going to behave differently for different fill-factors, so if allow it
to be set for GIST, GIST developers can pull the value if they want.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


pgsql-hackers by date:

Previous
From: "Matthew T. O'Connor"
Date:
Subject: Re: autovacuum
Next
From: Bruce Momjian
Date:
Subject: Re: log_min_messages and debug levels