From: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
---|---|
To: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi> |
Cc: | Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, andres(at)anarazel(dot)de, michael(at)paquier(dot)xyz, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: Network failure may prevent promotion |
Date: | 2024-01-24 11:29:07 |
Message-ID: | CAHGQGwHodkBpmB0_228-+k9yn=HL9ReNRWzWez+nQTnoLObnJw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Jan 23, 2024 at 6:43 PM Heikki Linnakangas <hlinnaka(at)iki(dot)fi> wrote:
> There's an existing AmWalReceiverProcess() macro too. Let's use that.
+1
> Hmm, but doesn't bgworker_die() have that problem with exit(1)ing in the
> signal handler?
Yes, that's a problem. This issue was raised sometimes so far,
but has not been resolved yet.
> I also wonder if we should replace SignalHandlerForShutdownRequest()
> completely with die(), in all processes? The difference is that
> SignalHandlerForShutdownRequest() uses ShutdownRequestPending, while
> die() uses ProcDiePending && InterruptPending to indicate that the
> signal was received. Or do some of the processes want to check for
> ShutdownRequestPending only at specific places, and don't want to get
> terminated at the any random CHECK_FOR_INTERRUPTS()?
For example, checkpointer seems to want to handle a shutdown request
only when no other checkpoint is in progress because initiating a shutdown
checkpoint while another checkpoint is running could lead to issues.
Also I just wonder if even walreceiver can exit safely at any random
CHECK_FOR_INTERRUPTS()...
Regards,
--
Fujii Masao
From | Date | Subject | |
---|---|---|---|
Next Message | Hayato Kuroda (Fujitsu) | 2024-01-24 11:43:00 | RE: speed up a logical replica setup |
Previous Message | Alvaro Herrera | 2024-01-24 11:14:17 | s_lock_test no longer works |