Re: backend hangs at immediate shutdown (Re: Back-branch update releases coming in a couple weeks) - Mailing list pgsql-hackers

From MauMau
Subject Re: backend hangs at immediate shutdown (Re: Back-branch update releases coming in a couple weeks)
Date
Msg-id 6FDBFDBC492C4C87ABC93EDF537C70CE@maumau
Whole thread Raw
In response to Re: backend hangs at immediate shutdown (Re: Back-branch update releases coming in a couple weeks)  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: backend hangs at immediate shutdown (Re: Back-branch update releases coming in a couple weeks)
List pgsql-hackers
Hi, Alvaro san,

From: "Alvaro Herrera" <alvherre@2ndquadrant.com>
> MauMau escribió:
> Yeah, I see that --- after removing that early exit, there are unwanted
> messages.  And in fact there are some signals sent that weren't
> previously sent.  Clearly we need something here: if we're in immediate
> shutdown handler, don't signal anyone (because they have already been
> signalled) and don't log any more messages; but the cleaning up of
> postmaster's process list must still be carried out.
>
> Would you please add that on top of the attached cleaned up version of
> your patch?

I did this.  Please find attached the revised patch.  I modified
HandleChildCrash().  I tested the immediate shutdown, and the child cleanup
succeeded.

In addition, I added if condition at the end of the function.  This is to
prevent resetting AbortStartTime every time one child terminates.

Regards
MauMau


Attachment

pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Min value for port
Next
From: Maciej Gajewski
Date:
Subject: Re: Review: query result history in psql