Re: backend hangs at immediate shutdown (Re: Back-branch update releases coming in a couple weeks)
MauMau <maumau307@gmail.com>
From: "MauMau" <maumau307@gmail.com>
To: "Alvaro Herrera" <alvherre@2ndquadrant.com>
Cc: "Tom Lane" <tgl@sss.pgh.pa.us>, "Andres Freund" <andres@2ndquadrant.com>,
"Peter Eisentraut" <peter_e@gmx.net>, <pgsql-hackers@postgreSQL.org>
Date: 2013-06-21T13:27:26Z
Lists: 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
Commits
-
Consistency check should compare last record replayed, not last record read.
- 970fb12de121 9.3.0 cited
-
Update minimum recovery point on truncation.
- 7bffc9b7bf9e 9.3.0 cited