Re: passing parameters to CREATE INDEX

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
Subject: Re: passing parameters to CREATE INDEX
Date: 2006-07-04 21:40:07
Message-ID: 26782.1152049207@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Simon Riggs <simon(at)2ndquadrant(dot)com> writes:
> Just wanted to make clear to Hackers that the gates are now open to
> include other parameters for CREATE INDEX, as originally requested here:
> http://archives.postgresql.org/pgsql-hackers/2005-09/msg00851.php

Just to follow up on the discussion of that thread: what's been
implemented is a way to store arbitrary name=value strings in an index's
pg_class entry, and to make these available in a pre-parsed form through
the index relcache entry. However you'd have to be cautious about using
the values directly for any fundamental index structure decisions,
because ALTER INDEX will just change them without giving you an
opportunity to modify the index in response. So depending on what you
are doing, you might need to store the "real" values in the index
metapage, and set those values from the reloptions parameters only at
ambuild() time. This would mean that ALTER INDEX + REINDEX would be the
procedure needed to change the structure of an existing index. OTOH,
if you can tolerate on-the-fly changes of a parameter, then using it
directly from the rd_options struct would be reasonable.

Also: as of CVS tip ginoptions() accepts FILLFACTOR but nothing is done
with it. Can you do something useful with FILLFACTOR in GIN?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hannu Krosing 2006-07-04 22:45:59 Re: update/insert, delete/insert efficiency WRT vacuum
Previous Message Simon Riggs 2006-07-04 21:15:57 passing parameters to CREATE INDEX