Re: fulltext searching via a custom index type - Mailing list pgsql-hackers

From Eric Ridge
Subject Re: fulltext searching via a custom index type
Date
Msg-id 924A5437-37E5-11D8-A406-000A95BB5944@tcdi.com
Whole thread Raw
In response to Re: fulltext searching via a custom index type  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: fulltext searching via a custom index type
List pgsql-hackers
On Dec 26, 2003, at 3:22 PM, Tom Lane wrote:
>> 3) How does one get the $PGDATA directory?
>
> DataDir.  Why should you care?  An index AM that wants to know this is
> probably broken IMHO; it's certainly trying to do something that's
> outside the charter of index AMs, and is likely to cause lots of
> headaches.

Xapian has it's own storage subsystem, and that's what I'm using to 
store the index... not using anything internal to postgres (although 
this could change).  As such, Xapian needs to know *where* to save its 
indexes... $PGDATA seemed like a good place to start.

>> 4) Can a function be registered as part of a transaction, pre-commit 
>> --
>> so the function can have an opportunity to abort the transaction.
>
> Why would that be a good idea?  When exactly would you expect it to be
> called (relative to the other ninety-nine things that happen at 
> commit)?
> How are you going to recover if something else aborts the transaction,
> either before or after your function runs?

I don't really have an answer to this.  :)

> I get the impression from your questions that you are trying to make an
> end run around the transaction mechanism.

Perhaps.  I'm actually fishing for ideas to bridge xapian's transaction 
facilities to postgres.  Your comment confirms my suspicions that it 
just ain't gunna work out.

> This is almost certainly doomed to failure.  You need to find a way of 
> storing all your data
> within the ordinary index structure.

You are probably right.  :)  I'm just playing around right now.  I do 
appreciate your response, it's given me a lot to think about.

eric



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: connections problem
Next
From: Tom Lane
Date:
Subject: Re: fulltext searching via a custom index type