On Thu, Nov 9, 2023 at 9:15 PM Drouvot, Bertrand
<bertranddrouvot...@gmail.com> wrote:
>
>
> You mean here?
>
> /*
>   * Check to see if promotion is requested. Note that we do
>   * this only after failure, so when you promote, we still
>   * finish replaying as much as we can from archive and
>   * pg_wal before failover.
>   */
> if (StandbyMode && CheckForStandbyTrigger())
> {
>         XLogShutdownWalRcv();
>          return XLREAD_FAIL;
> }
>
> If so, that sounds like a good place to me.
>

One more thing to think about is whether we want to shut down syncslot
workers as well on promotion similar to walreceiver? Because we don't
want them to even attempt once to sync after promotion.

-- 
With Regards,
Amit Kapila.


Reply via email to