Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YX9Ja-0004r6-Sl for pgsql-hackers@arkaria.postgresql.org; Sun, 15 Mar 2015 14:14:51 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YX9Ja-0001Ea-2Z for pgsql-hackers@arkaria.postgresql.org; Sun, 15 Mar 2015 14:14:50 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YX9JY-0001ET-MP for pgsql-hackers@postgresql.org; Sun, 15 Mar 2015 14:14:48 +0000 Received: from mail-we0-f174.google.com ([74.125.82.174]) by magus.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1YX9JU-00079y-WA for pgsql-hackers@postgresql.org; Sun, 15 Mar 2015 14:14:47 +0000 Received: by webcq43 with SMTP id cq43so21562237web.2 for ; Sun, 15 Mar 2015 07:14:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=kLxrSPXBYYuLqTSy29R2aYsnf0kUl/enU+sUpvXYEYs=; b=VGJb6M6LQfou2wmv/kd8LRlgnXmIWRgV+6uKfWTUVyFP5Pl4tRgJV7ZLm3UT1ngdqa MDYtSAUvRglWtUpozqPJY3Qlj3vLXIan/gJ9kjoKEaSoLL9zU8f60S34EaOBY+SNGvf0 X6No4HFdhUmZJZMK1pkkw5CpleZDAhXwlUkkPM6Sapd52wYFk4ASx5t7ka3gqEyuGeSQ GSHxGuPgQSf0D597BUBsYXayngbVw2kF/a4mWrnjjxHkSYDOLx1sUKsU3Q1eft9fr789 yKBlS06WOnuCZVC6vLCZPWOk/LVd2+KykLJr4dXG0Nf5I48sCKGPhpDTrbabeDAUI+8Z Rb1w== X-Gm-Message-State: ALoCoQmAk1e/Xz3dsGpnZS7DZ5dqHAcY+lDDWzwVpn68Ba7umuY2AQlkVsFP2l+Nkw3QNrS8cGT/ X-Received: by 10.194.9.98 with SMTP id y2mr116426328wja.85.1426428883326; Sun, 15 Mar 2015 07:14:43 -0700 (PDT) Received: from [10.1.0.3] (190.84.broadband17.iol.cz. [109.80.84.190]) by mx.google.com with ESMTPSA id v8sm6726568wib.0.2015.03.15.07.14.41 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 15 Mar 2015 07:14:42 -0700 (PDT) Message-ID: <550593D0.3020106@2ndquadrant.com> Date: Sun, 15 Mar 2015 15:14:40 +0100 From: Petr Jelinek User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Magnus Hagander , Andres Freund CC: PostgreSQL-development , Simon Riggs Subject: Re: recovery_target_action = pause & hot_standby = off References: <20150312145202.GD20199@awork2.anarazel.de> <20150315132707.GB19792@alap3.anarazel.de> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 15/03/15 14:51, Magnus Hagander wrote: > On Sun, Mar 15, 2015 at 2:27 PM, Andres Freund > 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