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 3A4BFA888E9E49BABEE7C2A9460883A3@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
From: "Alvaro Herrera" <alvherre@2ndquadrant.com>
> MauMau escribió:
>
>> One concern is that umount would fail in such a situation because
>> postgres has some open files on the filesystem, which is on the
>> shared disk in case of traditional HA cluster.
>
> See my reply to Noah.  If postmaster stays around, would this be any
> different?  I don't think so.

I'll consider this a bit and respond as a reply to Andres-san's mail.


> Actually, in further testing I noticed that the fast-path you introduced
> in BackendCleanup (or was it HandleChildCrash?) in the immediate
> shutdown case caused postmaster to fail to clean up properly after
> sending the SIGKILL signal, so I had to remove that as well.  Was there
> any reason for that?

You are talking about the code below at the beginning of HandleChildCrash(), 
aren't you?
/* Do nothing if the child terminated due to immediate shutdown */if (Shutdown == ImmediateShutdown) return;

If my memory is correct, this was necessary; without this, 
HandleChildCrash() or LogChildExit() left extra messages in the server log.

LOG:  %s (PID %d) exited with exit code %d
LOG:  terminating any other active server processes

These messages are output because postmaster sends SIGQUIT to its children 
and wait for them to terminate.  The children exit with non-zero status when 
they receive SIGQUIT.


Regards
MauMau




pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Request for Patch Feedback: Lag & Lead Window Functions Can Ignore Nulls
Next
From: Robert Haas
Date:
Subject: Re: [PATCH] pgbench --throttle (submission 7 - with lag measurement)