pg.ddx.io  pgsql-patches@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Simon Riggs <simon@2ndQuadrant.com>
Cc: Gregory Stark <stark@enterprisedb.com>
Cc: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Cc: ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp>
Cc: pgsql-hackers@postgresql.org
Subject: Re: rmgr hooks and contrib/rmgr_hook
Date: Mon, 15 Sep 2008 10:04:33 -0400
Message-ID: <25319.1221487473@sss.pgh.pa.us> (raw)
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>

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 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



view thread (23+ messages)  latest in thread

Message-ID: <25319.1221487473@sss.pgh.pa.us>
Permalink:  ../25319.1221487473@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/25319.1221487473@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-patches@postgresql.org
  Cc: tgl@sss.pgh.pa.us, simon@2ndQuadrant.com, stark@enterprisedb.com, heikki.linnakangas@enterprisedb.com, itagaki.takahiro@oss.ntt.co.jp, pgsql-hackers@postgresql.org
  Subject: Re: rmgr hooks and contrib/rmgr_hook
  In-Reply-To: <25319.1221487473@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox