Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 2155664FCFD for ; Mon, 15 Sep 2008 12:44:12 -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 03684-06 for ; Mon, 15 Sep 2008 12:44:01 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.173]) by postgresql.org (Postfix) with ESMTP id 647B564FCF7 for ; Mon, 15 Sep 2008 12:43:59 -0300 (ADT) Received: by ug-out-1314.google.com with SMTP id 29so996049ugo.7 for ; Mon, 15 Sep 2008 08:43:57 -0700 (PDT) Received: by 10.210.120.17 with SMTP id s17mr10353133ebc.85.1221493436942; Mon, 15 Sep 2008 08:43:56 -0700 (PDT) Received: from oxford.xeocode.com.enterprisedb.com ( [82.16.16.210]) by mx.google.com with ESMTPS id j8sm6196044gvb.1.2008.09.15.08.43.55 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 15 Sep 2008 08:43:56 -0700 (PDT) To: Simon Riggs Cc: Tom Lane , Heikki Linnakangas , ITAGAKI Takahiro , pgsql-hackers@postgresql.org Subject: Re: rmgr hooks and contrib/rmgr_hook In-Reply-To: <1221490804.3913.1406.camel@ebony.2ndQuadrant> (Simon Riggs's message of "Mon\, 15 Sep 2008 16\:00\:04 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) X-Draft-From: ("nnimap+imap.gmail.com:HACKERS" 1281) 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> <25319.1221487473@sss.pgh.pa.us> <1221490804.3913.1406.camel@ebony.2ndQuadrant> From: Gregory Stark Organization: EnterpriseDB Date: Mon, 15 Sep 2008 16:43:54 +0100 Message-ID: <87k5ddmn2d.fsf@oxford.xeocode.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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/986 X-Sequence-Number: 124115 Simon Riggs writes: > Bottom line is that any backup of Postgres needs to include plugin > directories, otherwise parts of the application could stop working > following restore. This patch doesn't change that. No, backups of executables are normally not the same backups as the data and in many cases -- minor upgrades for example -- cannot be. > * add the rmgr bms to the long header of each WAL file > > * change !RmgrIdIsValid() so that it causes FATAL by default. This then > allows people to correct a mistake and retry. We provide an option to > treat such errors as corrupt data and assume we have reached the end of > WAL. I'm not sure but I think this just begs the question. The problem is to ensure that the rmgrid means the same thing on the restoring database as it does on the original database, or at least a compatible version. I think this would mean having a long text description and version number to compare. And as Tom points out startup isn't often enough. Would WAL headers even be often enough? We would have to ensure there was never two versions of the plugin in the same WAL file. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's On-Demand Production Tuning