pg.ddx.io  pgsql-patches@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Simon Riggs <simon@2ndQuadrant.com>
To: Gregory Stark <stark@enterprisedb.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
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 18:03:56 +0100
Message-ID: <1221498236.3913.1442.camel@ebony.2ndQuadrant> (raw)
In-Reply-To: <87k5ddmn2d.fsf@oxford.xeocode.com>
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>
	<87k5ddmn2d.fsf@oxford.xeocode.com>


On Mon, 2008-09-15 at 16:43 +0100, Gregory Stark wrote:
> Simon Riggs <simon@2ndQuadrant.com> 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.

So you advise your clients to do backup in two halves. Then complain
that this is a bad way to do a backup because it may cause
insurmountable problems on restore. And then seek to reject a patch
because of that, even though similar problems already exist in other
parts of the system. I'm sorry, but that is circular, then faulted
logic.

If you do a minor upgrade that changes the on-disk format of *any* part
of the system then you have just introduced a limitation into what
software can be used for restore. That could be a new version of a
custom datatype just as easily as it could be an rmgr plugin. Shall we
ban custom datatypes? Should we add a version number into every varlen
header just in case somebody switched release levels, then forgot?

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

Why is that any different to using functions or other plugins? If you
restore data into a database where the functions have the same names,
yet do different things then you are in trouble. Period.

If you don't use an rmgr plugin at all then you have nothing different
to do, nor will you see any different messages. If you use *any*
external server software, expect to read the instructions or have
problems.

-- 
 Simon Riggs           www.2ndQuadrant.com
 PostgreSQL Training, Services and Support




view thread (23+ messages)  latest in thread

Message-ID: <1221498236.3913.1442.camel@ebony.2ndQuadrant>
Permalink:  ../1221498236.3913.1442.camel@ebony.2ndQuadrant/
Also on:    postgresql.org/message-id/1221498236.3913.1442.camel@ebony.2ndQuadrant

 · 

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: simon@2ndQuadrant.com, stark@enterprisedb.com, tgl@sss.pgh.pa.us, 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: <1221498236.3913.1442.camel@ebony.2ndQuadrant>

* 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