Re: how to use advanced gist options

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Sergej Galkin <sergej(dot)galkin(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: how to use advanced gist options
Date: 2010-03-15 21:48:27
Message-ID: 1268689707.4053.224.camel@monkey-cat.sm.truviso.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, 2010-03-14 at 06:50 -0700, Sergej Galkin wrote:
> 1) For example - can I delete entry in my picksplit procedure ?

No, entries are automatically removed by postgres; and only when the
underlying tuples in the table are removed (or they no longer match the
predicate of a partial index).

> 2) Or to add logical conditions - when picksplit node ? For exampe
> change default "when number of entries of node is much than XX, split
> node" - to "when number of entries which element "state" is "on" is
> much than XX, split node ?"

No, GiST doesn't allow that kind of fine-grained control. It's meant to
be a level above those details.

You can actually write your own index access method and plug that in to
postgresql at runtime. This is substantially more difficult than using
GiST, of course. The other disadvantage is that there are (currently) no
hooks for WAL recovery, so a crash may require an index rebuild (btree,
gist, and gin are safe against this by using the WAL).

Regards,
Jeff Davis

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2010-03-15 22:47:46 Re: Ragged latency log data in multi-threaded pgbench
Previous Message Bruce Momjian 2010-03-15 20:24:35 Re: Getting to beta1