pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <hlinnaka@iki.fi>
To: Michael Banck <michael.banck@credativ.de>
To: pgsql-hackers@postgresql.org
Subject: Re: pg_rewind: Should abort if both --source-pgdata and --source-server are specified
Date: Fri, 7 Oct 2016 14:39:09 +0300
Message-ID: <6f3dd14e-acf4-1bc2-0f0a-5c8eebe92de4@iki.fi> (raw)
In-Reply-To: <20161007103414.GD12247@nighthawk.caipicrew.dd-dns.de>
References: <20161007103414.GD12247@nighthawk.caipicrew.dd-dns.de>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

On 10/07/2016 01:34 PM, Michael Banck wrote:
> Hi,
>
> ISTM that pg_rewind's --source-pgdata and --source-server options are
> mutually exclusive, and the synopsis in the documentation seems to
> indicate that as well:
>
> |pg_rewind [option...] {-D | --target-pgdata} directory
> |{--source-pgdata=directory | --source-server=connstr}
>
> However, there is no such check in the code.
>
> I've seen people assume --source-pgdata is supposed to be the data
> directory location on the remote server if they specify --source-server
> as well, and are then confused by error messages.
>
> So I think pg_rewind should abort in this case.  Patch for that attached.

Agreed. Committed, thanks!

- Heikki



-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (2+ messages)

Message-ID: <6f3dd14e-acf4-1bc2-0f0a-5c8eebe92de4@iki.fi>
Permalink:  ../6f3dd14e-acf4-1bc2-0f0a-5c8eebe92de4@iki.fi/
Also on:    postgresql.org/message-id/6f3dd14e-acf4-1bc2-0f0a-5c8eebe92de4@iki.fi

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: hlinnaka@iki.fi, michael.banck@credativ.de
  Subject: Re: pg_rewind: Should abort if both --source-pgdata and --source-server are specified
  In-Reply-To: <6f3dd14e-acf4-1bc2-0f0a-5c8eebe92de4@iki.fi>
  References: <20161007103414.GD12247@nighthawk.caipicrew.dd-dns.de> <6f3dd14e-acf4-1bc2-0f0a-5c8eebe92de4@iki.fi>

* 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