Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 2D015650080 for ; Mon, 15 Sep 2008 10:55:31 -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 68304-01-7 for ; Mon, 15 Sep 2008 10:55:23 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from outmail136170.authsmtp.com (outmail136170.authsmtp.com [62.13.136.170]) by postgresql.org (Postfix) with ESMTP id 4A06B6503EB for ; Mon, 15 Sep 2008 10:48:57 -0300 (ADT) Received: from mail-c187.authsmtp.com (mail-c187.authsmtp.com [62.13.128.33]) by punt6.authsmtp.com (8.14.2/8.14.2/Kp) with ESMTP id m8FDmJYS009952; Mon, 15 Sep 2008 14:48:19 +0100 (BST) Received: from [192.168.0.3] (85-211-98-178.dyn.gotadsl.co.uk [85.211.98.178]) (authenticated bits=0) by mail.authsmtp.com (8.14.2/8.14.2/Kp) with ESMTP id m8FDmIsC031572; Mon, 15 Sep 2008 14:48:18 +0100 (BST) Subject: Re: rmgr hooks and contrib/rmgr_hook From: Simon Riggs To: Tom Lane Cc: Gregory Stark , Heikki Linnakangas , ITAGAKI Takahiro , pgsql-hackers@postgresql.org In-Reply-To: <24006.1221483138@sss.pgh.pa.us> 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> Content-Type: text/plain Date: Mon, 15 Sep 2008 14:24:23 +0100 Message-Id: <1221485063.3913.1350.camel@ebony.2ndQuadrant> Mime-Version: 1.0 X-Mailer: Evolution 2.12.0 Content-Transfer-Encoding: 7bit X-Server-Quench: f4515d34-832c-11dd-8155-001185d377ca X-AuthRoute: OCdxZQATClZOTQEd DAteCiNZVAwpPBRK HVkIKg5MJUcNSQVJ NksacxtFaQBbflxB HGQLW1xEUVl7XWt/ agMfZQBDYEtPQQxi TklOSk1QEQdtHhxP WxZoJkQLNHZGe391 YkQsXXFbXQoscUN8 RxpXEXAOZmUzdWEe BBRFfwJRdR5Kfh5E YlUrV3QKMjRJBC9q VzwTFhsSEA9kHWxP Rw4XZVIVRkUQVjc6 S1gJGjMzB0wPAD82 IAYRKlkbHy41 X-Authentic-SMTP: 61633235383639.squirrel.dmpriest.net.uk:1186/Kp X-Report-SPAM: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-Virus-Status: No virus detected - but ensure you scan with your own anti-virus system! 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/974 X-Sequence-Number: 124103 On Mon, 2008-09-15 at 08:52 -0400, Tom Lane wrote: > Gregory Stark writes: > > Simon Riggs writes: > >> Indexes have always been able to be added dynamically. Now they can be > >> recovered correctly as well. > > > Hm, so currently if you want to add a new indexam you can't just insert into > > pg_am and make them recoverable. You basically have to build in your new index > > access method into Postgres with the new rmgr. That is annoying and a problem > > worth tackling. > > I concur with Heikki that that's not exactly a compelling use-case. > I've never heard of anyone building a non-core index AM at all; much > less trying to use it in a production context. Given the obvious > potential for version-mismatch-type problems, it's hard to believe > that anyone ever would try. The lack of a chicken is not an argument against the use case for an egg. But in any case, Bizgres was exactly this case, so they already did. We just forced the authors to produce a code fork to do it, confusing people rather than attracting people to Postgres. 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. Certain message types have changed, but messages are all independent across rmgrs, so insulated from change. 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. Seems much more likely to me that authors would have one module containing both as a way of avoiding the problem altogether. So I'm not sure what to check, and against what? 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. -- Simon Riggs www.2ndQuadrant.com PostgreSQL Training, Services and Support