Re: user-defined tree methods in GIST

Lists: pgsql-hackers
From: "sharath kumar" <k(dot)sharat(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: user-defined tree methods in GIST
Date: 2007-03-06 08:20:34
Message-ID: 63b2ddcd0703060020l2cd716dbv836c36ab517791cf@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

I need some help in building new index structure using GIST.
I have to include a procedure for restructuring the tree immediately after
i have created the index using gist. How do i do it?
Actually I am trying to implement the slim-tree index using gist. To
increase the performance, a slim-down algorithm runs after creation of the
slim-tree. Where can i give a call to this slim-down procedure after the
tree has been built using gist?

Regards
Sharat.


From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: sharath kumar <k(dot)sharat(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: user-defined tree methods in GIST
Date: 2007-03-06 11:36:40
Message-ID: 20070306113640.GA9124@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Tue, Mar 06, 2007 at 01:50:34PM +0530, sharath kumar wrote:
> I need some help in building new index structure using GIST.
> I have to include a procedure for restructuring the tree immediately after
> i have created the index using gist. How do i do it?
> Actually I am trying to implement the slim-tree index using gist. To
> increase the performance, a slim-down algorithm runs after creation of the
> slim-tree. Where can i give a call to this slim-down procedure after the
> tree has been built using gist?

I don't quite understand what a slim-tree index is, but by my reading
it's an algorithm to make picksplit work better. I don't think you need
to touch the index machinery at all.

Also, I don't think it's a good plan to try and manipulate the index
wholesale after it's built. Once it's built, queries are going want to
use it and any changes are are going to need to be WAL logged and made
crash safe which seems quite a lot of work for something you can
probably do during picksplit.

Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.


From: Teodor Sigaev <teodor(at)sigaev(dot)ru>
To: sharath kumar <k(dot)sharat(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: user-defined tree methods in GIST
Date: 2007-03-06 15:14:40
Message-ID: 45ED8560.8020704@sigaev.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

> I need some help in building new index structure using GIST.
> I have to include a procedure for restructuring the tree immediately
> after i have created the index using gist. How do i do it?

IMHO, you don't have a chance to do it without patching postgres or developing
your own low-level function.

Try to play with SP-GiST (http://www.cs.purdue.edu/spgist/). SP-GiST is a
modification of GiST for Space Partitioning Trees. But they patch will not work
with 8.2 and up because of lack of concurrency. 8.2 doesn't support indexes
without concurrency.

--
Teodor Sigaev E-mail: teodor(at)sigaev(dot)ru
WWW: http://www.sigaev.ru/