Re: Race conditions with checkpointer and shutdown
Thomas Munro <thomas.munro@gmail.com>
From: Thomas Munro <thomas.munro@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Michael Paquier <michael@paquier.xyz>, Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2019-04-18T21:58:40Z
Lists: pgsql-hackers
On Fri, Apr 19, 2019 at 2:53 AM Tom Lane <tgl@sss.pgh.pa.us> wrote: > Question is, what other theory has anybody got? I wondered if there might be a way for PostmasterStateMachine() to be reached with without signals blocked, in the case where we fork a fresh checkpointers, and then it misses the SIGUSR2 that we immediately send because it hasn't installed its handler yet. But I can't see it. This is a curious thing from dragonet's log: 2019-04-16 08:23:24.178 CEST [8335] LOG: received fast shutdown request 2019-04-16 08:23:24.178 CEST [8335] LOG: aborting any active transactions 2019-04-16 08:23:24.178 CEST [8393] FATAL: terminating walreceiver process due to administrator command 2019-04-16 08:28:23.166 CEST [8337] LOG: restartpoint starting: time LogCheckpointStart() is the thing that writes "starting: ...", and it prefers to report "shutdown" over "time", but it didn't. -- Thomas Munro https://enterprisedb.com
Commits
-
In walreceiver, don't try to do ereport() in a signal handler.
- ac8f2e1ef34f 10.9 landed
- 9346d396fd4a 11.4 landed
- a1a789eb5ac8 12.0 landed