Re: [HACKERS] Proposal: pg_rewind to skip config files - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: [HACKERS] Proposal: pg_rewind to skip config files
Date
Msg-id 20170904133814.qxshuosfgiovpljp@alvherre.pgsql
Whole thread Raw
In response to Re: [HACKERS] Proposal: pg_rewind to skip config files  (Chris Travers <chris.travers@adjust.com>)
Responses Re: [HACKERS] Proposal: pg_rewind to skip config files
Re: [HACKERS] Proposal: pg_rewind to skip config files
List pgsql-hackers
Chris Travers wrote:
> On Mon, Sep 4, 2017 at 12:23 PM, Michael Paquier <michael.paquier@gmail.com>
> wrote:
> 
> > On Mon, Sep 4, 2017 at 7:21 PM, Michael Paquier
> > <michael.paquier@gmail.com> wrote:
> > > A simple idea would be to pass as a parameter a regex on which we
> > > check files to skip when scanning the directory of the target remotely
> > > or locally. This needs to be used with care though, it would be easy
> > > to corrupt an instance.
> >
> > I actually shortcut that with a strategy similar to base backups: logs
> > are on another partition, log_directory uses an absolute path, and
> > PGDATA has no reference to the log path.
> 
> Yeah, it is quite possible to move all these out of the data directory, but
> bad things can happen when you accidentally copy configuration or logs over
> those on the target and expecting that all environments will be properly
> set up to avoid these problems is not always a sane assumption.

I agree that operationally it's better if these files weren't in PGDATA
to start with, but from a customer support perspective, things are
frequently not already setup like that, so failing to support that
scenario is a loser.

I wonder how portable fnmatch() is in practice (which we don't currently
use anywhere).  A shell glob seems a more natural interface to me for
this than a regular expression.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: [HACKERS] pg_basebackup throttling doesn't throttle as promised
Next
From: i.kartyshov@postgrespro.ru
Date:
Subject: Re: [HACKERS] make async slave to wait for lsn to be replayed