pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Simon Riggs <simon@2ndQuadrant.com>
To: Fujii Masao <fujii@postgresql.org>
Cc: pgsql-committers <pgsql-committers@postgresql.org>
Subject: Re: pgsql: Make recovery_target_action = pause work.
Date: Thu, 21 May 2015 12:25:16 -0400
Message-ID: <CANP8+jLoOMkC4m+oVBVDF58d3X5RszRAxx30CGCsN74_36+=vA@mail.gmail.com> (raw)
In-Reply-To: <E1YvIXo-0000Do-LK@gemulon.postgresql.org>
References: <E1YvIXo-0000Do-LK@gemulon.postgresql.org>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

On 21 May 2015 at 00:57, Fujii Masao <fujii@postgresql.org> wrote:

> Make recovery_target_action = pause work.
>
> Previously even if recovery_target_action was set to pause and
> the recovery target was reached, the recovery could never be paused.
> Because the setting of pause was *always* overridden with that of
> shutdown unexpectedly. This override is valid and intentional
> if hot_standby is not enabled because there is no way to resume
> the paused recovery in this case and the setting of pause is
> completely useless. But not if hot_standby is enabled.
>
> This patch changes the code so that the setting of pause is overridden
> with that of shutdown only when hot_standby is not enabled.
>
> Bug reported by Andres Freund
>

Note for archives: this is a bug, not a change in behaviour.

The original coding of standbyState == STANDBY_DISABLED
wasn't correct because standbyState > STANDBY_DISABLED only after we run
InitRecoveryTransactionEnvironment() which happens later than this
parameter check.

-- 
Simon Riggs                http://www.2ndQuadrant.com/
<http://www.2ndquadrant.com/;
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

view thread (2+ messages)

Message-ID: <CANP8+jLoOMkC4m+oVBVDF58d3X5RszRAxx30CGCsN74_36+=vA@mail.gmail.com>
Permalink:  ../CANP8+jLoOMkC4m+oVBVDF58d3X5RszRAxx30CGCsN74_36+=vA@mail.gmail.com/
Also on:    postgresql.org/message-id/CANP8+jLoOMkC4m+oVBVDF58d3X5RszRAxx30CGCsN74_36+=vA@mail.gmail.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 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-committers@postgresql.org
  Cc: simon@2ndQuadrant.com, fujii@postgresql.org
  Subject: Re: pgsql: Make recovery_target_action = pause work.
  In-Reply-To: <CANP8+jLoOMkC4m+oVBVDF58d3X5RszRAxx30CGCsN74_36+=vA@mail.gmail.com>
  References: <E1YvIXo-0000Do-LK@gemulon.postgresql.org> <CANP8+jLoOMkC4m+oVBVDF58d3X5RszRAxx30CGCsN74_36+=vA@mail.gmail.com>

* 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