Re: Fix LOCK_TIMEOUT handling in slotsync worker - Mailing list pgsql-hackers

From Chao Li
Subject Re: Fix LOCK_TIMEOUT handling in slotsync worker
Date
Msg-id 277F2685-47A7-4C99-8818-5FAF66BD44E3@gmail.com
Whole thread Raw
In response to Fix LOCK_TIMEOUT handling in slotsync worker  ("Zhijie Hou (Fujitsu)" <houzj.fnst@fujitsu.com>)
List pgsql-hackers
Hi Zhijie,

Thanks for the patch. The change looks reasonable. ShutDownSlotSync() has set SlotSyncCtx->stopSignaled, and SIGUSR1’s
procsignal_sigusr1_handlerwill do SetLatch(MyLatch) that will in turn wake up ProcessSlotSyncInterrupts(), then hit if
(SlotSyncCtx->stopSignaled)and the slotsync worker terminates. 

> On Dec 8, 2025, at 10:04, Zhijie Hou (Fujitsu) <houzj.fnst@fujitsu.com> wrote:
>
> <v1-0001-Fix-LOCK_TIMEOUT-handling-in-slotsync-worker.patch>

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"

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/







pgsql-hackers by date:

Previous
From: Antonin Houska
Date:
Subject: Re: Adding REPACK [concurrently]
Next
From: Masahiko Sawada
Date:
Subject: Re: POC: enable logical decoding when wal_level = 'replica' without a server restart