pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@2ndquadrant.com>
To: Simon Riggs <simon@2ndQuadrant.com>
Cc: Fabrízio Mello <fabriziomello@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: KONDO Mitsumasa <kondo.mitsumasa@lab.ntt.co.jp>
Cc: Pavel Stehule <pavel.stehule@gmail.com>
Cc: Pgsql Hackers <pgsql-hackers@postgresql.org>
Subject: Re: Time-Delayed Standbys
Date: Sat, 14 Dec 2013 14:11:59 +0100
Message-ID: <20131214131159.GA3368@awork2.anarazel.de> (raw)
In-Reply-To: <CA+U5nMLaZ1sFKnP0QgRCaEBwBUUqdyuqicXKnwNsOBQL7qz1xA@mail.gmail.com>
References: <CA+TgmoaZa3D_RkPT+XZsEzMi-KvFu2NyLXD96RKy=L+qMh4oUQ@mail.gmail.com>
	<CA+U5nMJUF853tp-Gt8BeykeZ6wUv55bb8gitJW5tFTTuSQkYSA@mail.gmail.com>
	<CA+U5nMKXvEAqiPdgb-Rc_066xRVGCuzqS13L54go3u39KLZezg@mail.gmail.com>
	<CAFcNs+ovtwDkXsqPx=xcNEg2hy3jekoga89ytqDG12UwLq527g@mail.gmail.com>
	<CAFcNs+qD0AJ=qzhsHD9+v_Mhz0RTBJ=cJPCT_T=uT_JvvnC1FQ@mail.gmail.com>
	<CA+U5nMLhhPQ_FX-TuBLfvn0OMsPY-URZpE_CKtdROFXXoST=Vg@mail.gmail.com>
	<20131213115858.GI29402@awork2.anarazel.de>
	<CA+U5nMLRgEqvjyNnWGEO3pwAafBybtmvF6++OqDQHSasdnSqPg@mail.gmail.com>
	<20131213132203.GJ29402@awork2.anarazel.de>
	<CA+U5nMLaZ1sFKnP0QgRCaEBwBUUqdyuqicXKnwNsOBQL7qz1xA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

On 2013-12-13 13:44:30 +0000, Simon Riggs wrote:
> On 13 December 2013 13:22, Andres Freund <andres@2ndquadrant.com> wrote:
> > On 2013-12-13 13:09:13 +0000, Simon Riggs wrote:
> >> On 13 December 2013 11:58, Andres Freund <andres@2ndquadrant.com> wrote:
> >> >> I removed it because it was after the pause. I'll replace it, but
> >> >> before the pause.
> >> >
> >> > Doesn't after the pause make more sense? If somebody promoted while we
> >> > were waiting, we want to recognize that before rolling forward? The wait
> >> > can take a long while after all?
> >>
> >> That would change the way pause currently works, which is OOS for that patch.
> >
> > But this feature isn't pause itself - it's imo something
> > independent. Note that we currently
> > a) check pause again after recoveryApplyDelay(),
> > b) do check for promotion if the sleep in recoveryApplyDelay() is
> >    interrupted. So not checking after the final sleep seems confusing.
> 
> I'm proposing the attached patch.

LOoks good, although I'd move it down below the comment ;)

> This patch implements a consistent view of recovery pause, which is
> that when paused, we don't check for promotion, during or immediately
> after. That is user noticeable behaviour and shouldn't be changed
> without thought and discussion on a separate thread with a clear
> descriptive title. (I might argue in favour of it myself, I'm not yet
> decided).

Some more improvements in that are certainly would be good...

Greetings,

Andres Freund

-- 
 Andres Freund	                   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 (114+ messages)

Message-ID: <20131214131159.GA3368@awork2.anarazel.de>
Permalink:  ../20131214131159.GA3368@awork2.anarazel.de/
Also on:    postgresql.org/message-id/20131214131159.GA3368@awork2.anarazel.de

 · 

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: andres@2ndquadrant.com, simon@2ndQuadrant.com, fabriziomello@gmail.com, robertmhaas@gmail.com, tgl@sss.pgh.pa.us, kondo.mitsumasa@lab.ntt.co.jp, pavel.stehule@gmail.com
  Subject: Re: Time-Delayed Standbys
  In-Reply-To: <20131214131159.GA3368@awork2.anarazel.de>

* 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