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

Re: corner case about replication and shutdown

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: corner case about replication and shutdown
Date: 2011-04-03 23:46:55
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Sat, Apr 2, 2011 at 4:51 AM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
> 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.

Cool.  Committed.

Robert Haas
The Enterprise PostgreSQL Company

In response to

pgsql-hackers by date

Next:From: Robert HaasDate: 2011-04-03 23:51:46
Subject: Re: found a very confusing and maybe outdated sentence
Previous:From: Merlin MoncureDate: 2011-04-03 23:40:01
Subject: Re: Process local hint bit cache

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