Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id C1FFC64FD0F for ; Mon, 15 Sep 2008 11:05:24 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 71137-01 for ; Mon, 15 Sep 2008 11:05:21 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 4972D64FCDF for ; Mon, 15 Sep 2008 11:05:21 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id m8FE4Xve025320; Mon, 15 Sep 2008 10:04:33 -0400 (EDT) To: Simon Riggs cc: Gregory Stark , Heikki Linnakangas , ITAGAKI Takahiro , pgsql-hackers@postgresql.org Subject: Re: rmgr hooks and contrib/rmgr_hook In-reply-to: <1221485063.3913.1350.camel@ebony.2ndQuadrant> References: <20080901121833.4A18.52131E4D@oss.ntt.co.jp> <1220345064.4371.275.camel@ebony.2ndQuadrant> <20080902174613.76B2.52131E4D@oss.ntt.co.jp> <1220348980.4371.316.camel@ebony.2ndQuadrant> <14451.1220369969@sss.pgh.pa.us> <1220372673.4371.465.camel@ebony.2ndQuadrant> <48CB72C8.1070700@enterprisedb.com> <1221470800.3913.1229.camel@ebony.2ndQuadrant> <87sks1oi4o.fsf@oxford.xeocode.com> <24006.1221483138@sss.pgh.pa.us> <1221485063.3913.1350.camel@ebony.2ndQuadrant> Comments: In-reply-to Simon Riggs message dated "Mon, 15 Sep 2008 14:24:23 +0100" Date: Mon, 15 Sep 2008 10:04:33 -0400 Message-ID: <25319.1221487473@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200809/980 X-Sequence-Number: 124109 Simon Riggs 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 Inverted iNdex. 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