Re: Race conditions with checkpointer and shutdown - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: Race conditions with checkpointer and shutdown
Date
Msg-id CA+hUKGJE-VNHzkFp7MnvX_wXoVVxkHLfG19qFUzx80+vxYRqdg@mail.gmail.com
Whole thread Raw
In response to Re: Race conditions with checkpointer and shutdown  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Race conditions with checkpointer and shutdown
List 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



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Race conditions with checkpointer and shutdown
Next
From: Tom Lane
Date:
Subject: Re: Race conditions with checkpointer and shutdown