Re: rmgr hooks and contrib/rmgr_hook - Mailing list pgsql-hackers

From Tom Lane
Subject Re: rmgr hooks and contrib/rmgr_hook
Date
Msg-id 25319.1221487473@sss.pgh.pa.us
Whole thread Raw
In response to Re: rmgr hooks and contrib/rmgr_hook  (Simon Riggs <simon@2ndQuadrant.com>)
Responses Re: rmgr hooks and contrib/rmgr_hook  (Simon Riggs <simon@2ndQuadrant.com>)
List pgsql-hackers
Simon Riggs <simon@2ndQuadrant.com> writes:
> We have plugin APIs with possible version mismatches in other contexts,
> but I don't see us doing anything about that. In the context of WAL, the
> basic WAL format has not changed in about 6 releases, so its been one of
> the most stable file formats.

Er, that's simply false.  Read the revision history for xlog_internal.h.

> The version mismatch idea presumes that a code author would structure
> their code in two pieces: one to generate the WAL and one to read it.

No, the version mismatch problem is that you might try to read the WAL
with a different version of the plugin than you wrote it with.  Or maybe
with a completely unrelated plugin that was unfortunate enough to choose
the same rmgr ID.  We can't afford to insert complete versioning
information into each WAL record, so it's going to be pretty difficult
to avoid this risk.

> When people do write useful plugins in the future they will be
> potentially usable with any server at 8.4 or above. If we had had this
> feature a few releases ago, we could have made GIN available to earlier
> releases, for example.

Well, the initial commit for GIN looked like this:

2006-05-02 07:28  teodor
* contrib/tsearch2/Makefile,
contrib/tsearch2/ginidx.c,contrib/tsearch2/tsearch.sql.in,contrib/tsearch2/expected/tsearch2.out,contrib/tsearch2/sql/tsearch2.sql,
src/backend/access/Makefile,src/backend/access/gin/Makefile,
src/backend/access/gin/README,src/backend/access/gin/ginarrayproc.c,src/backend/access/gin/ginbtree.c,src/backend/access/gin/ginbulk.c,src/backend/access/gin/gindatapage.c,src/backend/access/gin/ginentrypage.c,src/backend/access/gin/ginget.c,src/backend/access/gin/gininsert.c,src/backend/access/gin/ginscan.c,
src/backend/access/gin/ginutil.c,src/backend/access/gin/ginvacuum.c,src/backend/access/gin/ginxlog.c,src/backend/access/transam/rmgr.c,
src/backend/commands/cluster.c,src/backend/commands/opclasscmds.c,
src/backend/commands/vacuum.c,src/backend/utils/adt/selfuncs.c,
src/backend/utils/init/globals.c,src/backend/utils/misc/guc.c,src/include/access/gin.h,src/include/access/rmgr.h,
src/include/catalog/catversion.h,src/include/catalog/pg_am.h,
src/include/catalog/pg_amop.h,src/include/catalog/pg_amproc.h,
src/include/catalog/pg_opclass.h,src/include/catalog/pg_operator.h,
src/include/catalog/pg_proc.h,src/include/utils/selfuncs.h,
src/test/regress/data/array.data,src/test/regress/expected/arrays.out,src/test/regress/expected/create_index.out,src/test/regress/expected/create_table.out,src/test/regress/expected/opr_sanity.out,src/test/regress/expected/sanity_check.out,src/test/regress/input/copy.source,src/test/regress/output/copy.source,src/test/regress/output/misc.source,src/test/regress/sql/arrays.sql,src/test/regress/sql/create_index.sql,src/test/regress/sql/create_table.sql,src/test/regress/sql/opr_sanity.sql:
GIN:Generalized InvertediNdex.    text[], int4[], Tsearch2 support for GIN.
 

Had the only core source file touched been rmgr.c, then maybe this
argument would be valid ...
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Brendan Jurd"
Date:
Subject: Re: Parsing of pg_hba.conf and authentication inconsistencies
Next
From: Tom Lane
Date:
Subject: Re: Parsing of pg_hba.conf and authentication inconsistencies