From: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
To: Fujii Masao <masao.fujii@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Jaime Casanova <jaime@2ndquadrant.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: time-delayed standbys
Date: Wed, 11 May 2011 14:53:41 +0300
Message-ID: <4DCA78C5.4040803@enterprisedb.com> (raw)
In-Reply-To: <BANLkTin4bCFrFX-n8JVG7QfzdYhVDBWnJQ@mail.gmail.com>
References: <BANLkTi==TTzHDqWzwJDjmOf__8YuA7L1jw@mail.gmail.com>
<BANLkTikHcD8H=iS=xZCTnyNAYMbDu3Tj1Q@mail.gmail.com>
<BANLkTinfrgsVK_8o9+mw6kWRcC4BxiR4jw@mail.gmail.com>
<BANLkTimDUswEE5nAjr31DQ=6GxRPU758kQ@mail.gmail.com>
<4DCA5BEC.2020805@enterprisedb.com>
<BANLkTin4bCFrFX-n8JVG7QfzdYhVDBWnJQ@mail.gmail.com>
On 11.05.2011 14:16, Fujii Masao wrote:
> On Wed, May 11, 2011 at 6:50 PM, Heikki Linnakangas
> <heikki.linnakangas@enterprisedb.com> wrote:
>> I think we can just always call ShutdownWalRcv(). It should be gone if the
>> server was promoted while streaming, but that's just an implementation
>> detail of what the promotion code does. There's no hard reason why it
>> shouldn't be running at that point anymore, as long as we kill it before
>> going any further.
>
> Okay. But I'd like to add the following assertion check just before
> ShutdownWalRcv() which you added, in order to detect such a bug
> that we found this time, i.e., the bug which causes unexpected end
> of recovery. Thought?
>
> Assert(reachedStopPoint || !WalRcvInProgress())
There's no unexpected end of recovery here. The recovery ends when we
reach the target, as it should. It was the assumption that WAL receiver
can't be running at that point anymore that was wrong.
That assertion would work, AFAICS, but I don't think it's something we
need to assert. There isn't any harm done if WAL receiver is still
running, as long as we shut it down at that point.
>> Committed a patch to do that.
>
> Thanks. Should we backport it to 9.0? 9.0 has the same problem.
Ah, thanks, missed that, Cherry-picked to 9.0 now as well.
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
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: heikki.linnakangas@enterprisedb.com, masao.fujii@gmail.com, robertmhaas@gmail.com, jaime@2ndquadrant.com
Subject: Re: time-delayed standbys
In-Reply-To: <4DCA78C5.4040803@enterprisedb.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