Skip site navigation (1) Skip section navigation (2)

Re: corner case about replication and shutdown

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: corner case about replication and shutdown
Date: 2011-04-02 08:51:15
Message-ID: AANLkTikEwdWJcyM6yc8SOV+YG-PBtbj0VOSgHU3vr1ri@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On Fri, Apr 1, 2011 at 11:11 PM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Thu, Mar 31, 2011 at 11:12 PM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
>> Another simple fix is to make walsender send SIGUSR1 to postmaster
>> so that it calls PostmasterStateMachine() in sigusr1_handler(), when it
>> marks itself as walsender. The attached patch does this. Thought?
>
> That looks OK to me.  Have you tested it?

Yes. I added the sleep just before MarkPostmasterChildWalSender() in
walsender.c,
compiled, started replication, and then requested smart shutdown as soon as
walsender was forked (i.e., during the sleep). Without the patch, the server got
stuck infinitely. With the patch, smart shutdown worked as expected.

Regards,

-- 
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

In response to

Responses

pgsql-hackers by date

Next:From: bschaudhari972Date: 2011-04-02 09:41:29
Subject: Finding a flow when query is fired in postgresql
Previous:From: Devrim GÜNDÜZDate: 2011-04-02 08:24:04
Subject: psql 9.1 alpha5: connection pointer is NULL

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group