Re: Adding a suffix array index - Mailing list pgsql-hackers

From Troels Arvin
Subject Re: Adding a suffix array index
Date
Msg-id pan.2004.11.28.21.11.11.788441@arvin.dk
Whole thread Raw
In response to Adding a suffix array index  (Troels Arvin <troels@arvin.dk>)
Responses Re: Adding a suffix array index  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Fri, 19 Nov 2004 10:35:20 -0500, Tom Lane wrote:

>> 2. Does someone know of interesting documentation (perhaps
>>    in the form of interesting code comments) which I should
>>    read, as a basis for creating a non-standard index type
>>    in PostgreSQL?
> 
> There's not a whole lot :-( and you should definitely expect to have to
> read code, not just comments.

I have read some code, and have gained some understanding. I think/hope.
However:

For the suffix array to work, it needs to store positions from the base
table (among other pieces of information): A suffix array stores the
complete set of suffixes from the indexed string, in sorted order. Storage
is in the form of pointers to the indexed string.

What kind of (logical) block identifier should I point to in my index? Can
I be guaranteed that the block will not move, leaving dangling pointers in
the index?

Am I right that the answer is related to BlockIdData? If I store
BlockIds in an index, do I then have to worry about physical blocks on
the disk which might somehow move?

-- 
Greetings from Troels Arvin, Copenhagen, Denmark




pgsql-hackers by date:

Previous
From: Roland Volkmann
Date:
Subject: Re: Error: column "nsptablespace" does not exist
Next
From: Tom Lane
Date:
Subject: Re: Adding a suffix array index