Re: recovery_target_action = pause & hot_standby = off

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Petr Jelinek <petr(at)2ndquadrant(dot)com>
Subject: Re: recovery_target_action = pause & hot_standby = off
Date: 2015-03-15 23:38:19
Message-ID: CAB7nPqREyrTSDD8PKUYLEusqr4XTmDvNSSrmGbMHg7h8CJ5fkQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Mar 16, 2015 at 7:38 AM, Andres Freund wrote:
> On 2015-03-15 20:10:49 +0000, Simon Riggs wrote:
>> On 15 March 2015 at 14:16, Andres Freund wrote:
>>
>> > Personally I think we just should change the default to 'shutdown' for
>> > all cases. That makes documentation and behaviour less surprising. And
>> > makes experimenting less dangerous, since you can just start again.
>>
>> We need to look at the specific situation, not make a generic decision.
>>
>> If hot_standby = off, we are unable to unpause, once paused.
>>
>> Changing the default doesn't alter that problem.
>>
>> We have two choices: 1) override to a sensible setting, 2) throw an error.
>>
>> (2) sounds clean at first but we must look deeper. We know that the
>> *only* possible other setting is 'shutdown', so it seems more user
>> friendly to do the thing we *know* they want (1), rather than pretend
>> that we don't.
>>
>> (1) is completely predictable and not at all surprising. Add a LOG
>> message if you wish, but don't throw an error.
>
> Sorry, I don't buy this. If I have "recovery_target_action = 'pause'" in
> the config file, I want it to pause. Not do something else, just because
> postgres doesn't have a interface to unpause without SQL access. That
> makes some sense to developers, but is pretty much ununderstandable for
> mere mortals.

+1 for removing this code block, and +1 for having a LOG message, with
an additional paragraph in the docs mentioning that when using pause
as recovery_target_action and hot_standby = off there is no direct
interface to unpause the node.
--
Michael

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2015-03-15 23:45:59 Re: Cygwin vs "win32" in configure
Previous Message Andreas Karlsson 2015-03-15 23:37:08 Re: Using 128-bit integers for sum, avg and statistics aggregates