agora inbox for pgsql-hackers@postgresql.org
help / color / mirror / Atom feedFrom: Petr Jelinek <petr@2ndquadrant.com>
To: Magnus Hagander <magnus@hagander.net>
To: Andres Freund <andres@2ndquadrant.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Cc: Simon Riggs <simon@2ndquadrant.com>
Subject: Re: recovery_target_action = pause & hot_standby = off
Date: Sun, 15 Mar 2015 15:14:40 +0100
Message-ID: <550593D0.3020106@2ndquadrant.com> (raw)
In-Reply-To: <CABUevEzZaXqMzTryrEo1Z8dmQgbmL0bh6tVHvSQqyTqfmn9Wkw@mail.gmail.com>
References: <20150312145202.GD20199@awork2.anarazel.de>
<20150315132707.GB19792@alap3.anarazel.de>
<CABUevEzZaXqMzTryrEo1Z8dmQgbmL0bh6tVHvSQqyTqfmn9Wkw@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
On 15/03/15 14:51, Magnus Hagander wrote:
> On Sun, Mar 15, 2015 at 2:27 PM, Andres Freund <andres@2ndquadrant.com
> <mailto:andres@2ndquadrant.com>> wrote:
>
> On 2015-03-12 15:52:02 +0100, Andres Freund wrote:
> > /*
> > * Override any inconsistent requests. Not that this is a
> change
> > * of behaviour in 9.5; prior to this we simply ignored a
> request
> > * to pause if hot_standby = off, which was surprising
> behaviour.
> > */
> > if (recoveryTargetAction == RECOVERY_TARGET_ACTION_PAUSE &&
> > recoveryTargetActionSet &&
> > standbyState == STANDBY_DISABLED)
> > recoveryTargetAction = RECOVERY_TARGET_ACTION_SHUTDOWN;
>
> While it's easy enough to fix I rather dislike the whole intent here
> though. *Silently* switching the mode of operation in a rather
> significant way seems like a bad idea to me. At the very least we need
> to emit a LOG message about this; but I think it'd be much better to
> error out instead.
>
> <9.5's behaviour was already quite surprising. But changing things to a
> different surprising behaviour seems like a bad idea.
>
>
> +1. Especially for "sensitive" operations like this, having
> predictable-behavior-or-error is usually the best choice.
>
Thinking about it again now, it does seem that ignoring user setting
because it's in conflict with another user setting is a bad idea and I
think we in general throw errors on those.
So +1 from me also.
--
Petr Jelinek http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
--
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 (18+ messages) latest in thread
Message-ID: <550593D0.3020106@2ndquadrant.com>
Permalink: ../../550593D0.3020106@2ndquadrant.com/
Also on: postgresql.org/message-id/550593D0.3020106@2ndquadrant.com
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-hackers@postgresql.org
Cc: petr@2ndquadrant.com, magnus@hagander.net, andres@2ndquadrant.com, simon@2ndquadrant.com
Subject: Re: recovery_target_action = pause & hot_standby = off
In-Reply-To: <550593D0.3020106@2ndquadrant.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox