Re: pg_rewind: Should abort if both --source-pgdata and --source-server are specified

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: Michael Banck <michael(dot)banck(at)credativ(dot)de>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_rewind: Should abort if both --source-pgdata and --source-server are specified
Date: 2016-10-07 11:39:09
Message-ID: 6f3dd14e-acf4-1bc2-0f0a-5c8eebe92de4@iki.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2016-10-07 11:49:58 Re: Declarative partitioning - another take
Previous Message Heikki Linnakangas 2016-10-07 10:46:31 Re: Radix tree for character conversion