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.

----
$ ./pgbench -i -s 10
# select relpages from pg_class where relname = 'accounts_pkey';
relpages | 2745    ( default PCTFree is 10% )

# set btree_leaf_free_percent = 0;
# reindex index accounts_pkey;
# select relpages from pg_class where relname = 'accounts_pkey';
relpages | 2475    ( <- about 2745 * 0.9 = 2470.5 )

# set btree_leaf_free_percent = 30;
# reindex index accounts_pkey;
# select relpages from pg_class where relname = 'accounts_pkey';
relpages | 3537    ( <- about 2745 * 0.9 / 0.7 = 3529.3 )
----

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?
- Should indexes remember their fillfactors when they are created?
    The last fillfactors will be used on next reindex.
- Is fillfactor useful for hash and gist indexes?
    I think hash does not need it, but gist might need it.

Look forward to your comments.
Thanks,

---
ITAGAKI Takahiro
NTT Cyber Space Laboratories

Attachment: btree_free_percent.patch
Description: Binary data

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org

Reply via email to