Re: Fix LOCK_TIMEOUT handling in slotsync worker

Amit Kapila <amit.kapila16@gmail.com>

From: Amit Kapila <amit.kapila16@gmail.com>
To: Chao Li <li.evan.chao@gmail.com>
Cc: "Zhijie Hou (Fujitsu)" <houzj.fnst@fujitsu.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-12-09T05:34:02Z
Lists: pgsql-hackers
On Mon, Dec 8, 2025 at 1:06 PM Chao Li <li.evan.chao@gmail.com> wrote:
>
> I have nit comment:
>
> ```
> -       if (ShutdownRequestPending)
> +       if (SlotSyncCtx->stopSignaled)
>         {
>                 ereport(LOG,
> -                               errmsg("replication slot synchronization worker is shutting down on receiving SIGINT"));
> +                               errmsg("replication slot synchronization worker is shutting down because promotion is triggered"));
> ```
>
> In the error message, “because promotion is triggered" sound a little redundant, can be just:
>
> "replication slot synchronization worker is shutting down due to promotion"
>

We have a number of existing similar messages like:  "logical
replication parallel apply worker for subscription \"%s\" will stop
because of a parameter change". So, how about: "replication slot
synchronization worker will stop because promotion is triggered"?

-- 
With Regards,
Amit Kapila.



Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Fix LOCK_TIMEOUT handling in slotsync worker.