Re: Pluggable Indexes - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Pluggable Indexes
Date
Msg-id 1232552655.2327.507.camel@ebony.2ndQuadrant
Whole thread Raw
In response to Re: Pluggable Indexes  (Gregory Stark <stark@enterprisedb.com>)
Responses Re: Pluggable Indexes  (Andrew Sullivan <ajs@crankycanuck.ca>)
List pgsql-hackers
On Wed, 2009-01-21 at 14:57 +0000, Gregory Stark wrote:
> But to do that we need an abstract interface that doesn't depend on
> internal data structures, not a generic plugin facility that allows
> the plugin to hijack the whole system.
> 
> We need something more like indexams which provides a set of call
> points which do specific functions, only get called when they're
> needed, and are expected to only do the one thing they've been asked
> to do.

Really this is just ridiculous scare-mongering. Hijack the whole system?

The patch takes special care to allow calls to the rmgr functions only
from the startup process. The APIs are exactly like the indexams and
*are* called only in specific ways, at specific times. At your earlier
request I put in filters to prevent WAL inserts for plugins that didn't
exist, ensuring that all WAL writes were crash recoverable.

You can already do all the weird stuff you like with index AMs, like
send emails to the Pope on every row insert. I can already create an
in-memory index for example. How exactly do the rmgr interface give more
power? The structure of the function pointers is identical to the
indexAM code...

-- Simon Riggs           www.2ndQuadrant.comPostgreSQL Training, Services and Support



pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: rmgr hooks (v2)
Next
From: Peter Eisentraut
Date:
Subject: Re: Re: [COMMITTERS] pgsql: Explicitly bind gettext() to the UTF8 locale when in use.