Re: corner case about replication and shutdown - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: corner case about replication and shutdown
Date
Msg-id AANLkTikEwdWJcyM6yc8SOV+YG-PBtbj0VOSgHU3vr1ri@mail.gmail.com
Whole thread Raw
In response to Re: corner case about replication and shutdown  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: corner case about replication and shutdown  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On Fri, Apr 1, 2011 at 11:11 PM, Robert Haas <robertmhaas@gmail.com> wrote:
> On Thu, Mar 31, 2011 at 11:12 PM, Fujii Masao <masao.fujii@gmail.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


pgsql-hackers by date:

Previous
From: Devrim GÜNDÜZ
Date:
Subject: psql 9.1 alpha5: connection pointer is NULL
Next
From: Heikki Linnakangas
Date:
Subject: Re: [DOCS] fixed doc bug in sepgsql.sgml