Re: Pluggable Indexes - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Pluggable Indexes
Date
Msg-id 1232585222.2327.729.camel@ebony.2ndQuadrant
Whole thread Raw
In response to Re: Pluggable Indexes  (Gregory Stark <stark@enterprisedb.com>)
List pgsql-hackers
On Thu, 2009-01-22 at 00:00 +0000, Gregory Stark wrote:

> But note that the interface is critical.

Yes, it is.

The existing rmgr code provides for 5 separate calls that a module needs
to implement to make an access method recoverable. btree, hash, gist and
gin already implement that API.

I haven't invented a new interface at all. All the patch does is expose
the existing API for plugins, allowing them to act in exactly the same
ways that the existing index types do.

If you have patch review comments about additional requirements for that
API, that is fine. But saying the API is wrong is not a reason to reject
the patch. Its a reason to change the patch.

> the consequences for getting something wrong are so much more dire.
> The entire cluster is dead and can't even be restored from backup.

Not true. If you decide to use a pluggable index and the plugin breaks,
you can turn off that index type and continue recovering the database.
If GIN breaks for example, you can simply bypass it and continue. So the
rmgr patch provides you a mechanism for recovering an existing system in
a way that is not currently possible - no data loss, just loss of
damaged indexes. And it provides an escape hatch if you use a pluggable
index and it breaks.

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



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: SET TRANSACTION and SQL Standard
Next
From: Simon Riggs
Date:
Subject: Re: Pluggable Indexes (was Re: rmgr hooks (v2))