Re: Archive recovery won't be completed on some situation.

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Archive recovery won't be completed on some situation.
Date: 2014-05-09 14:19:32
Message-ID: CAHGQGwFnZrdnmFze0zvV7JCnouQ_p2yCfY8xC9Ec+23qLxz1mA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Mar 20, 2014 at 11:38 PM, Alvaro Herrera
<alvherre(at)2ndquadrant(dot)com> wrote:
> Kyotaro HORIGUCHI escribió:
>> Hi, I confirmed that 82233ce7ea4 surely did it.
>>
>> At Wed, 19 Mar 2014 09:35:16 -0300, Alvaro Herrera wrote
>> > Fujii Masao escribió:
>> > > On Wed, Mar 19, 2014 at 7:57 PM, Heikki Linnakangas
>> > > <hlinnakangas(at)vmware(dot)com> wrote:
>> >
>> > > >> 9.4 canceles backup mode even on immediate shutdown so the
>> > > >> operation causes no problem, but 9.3 and before are doesn't.
>> > > >
>> > > > Hmm, I don't think we've changed that behavior in 9.4.
>> > >
>> > > ISTM 82233ce7ea42d6ba519aaec63008aff49da6c7af changed immdiate
>> > > shutdown that way.
>> >
>> > Uh, interesting. I didn't see that secondary effect. I hope it's not
>> > for ill?
>>
>> The crucial factor for the behavior change is that pmdie has
>> become not to exit immediately for SIGQUIT. 'case SIGQUIT:' in
>> pmdie() ended with "ExitPostmaster(0)" before the patch but now
>> it ends with 'PostmasterStateMachine(); break;' so continues to
>> run with pmState = PM_WAIT_BACKENDS, similar to SIGINT (fast
>> shutdown).
>>
>> After all, pmState changes to PM_NO_CHILDREN via PM_WAIT_DEAD_END
>> by SIGCHLDs from non-significant processes, then CancelBackup().
>
> Judging from what was being said on the thread, it seems that running
> CancelBackup() after an immediate shutdown is better than not doing it,
> correct?

This is listed as a 9.4 Open Item, but no one seems to want to revert
this change.
So I'll drop this from the Open Item list barring objections.

Regards,

--
Fujii Masao

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2014-05-09 14:26:33 Re: default opclass for jsonb (was Re: Call for GIST/GIN/SP-GIST opclass documentation)
Previous Message Robert Haas 2014-05-09 14:18:24 Re: test_shm_mq failing on anole (was: Sending out a request for more buildfarm animals?)