| From: | Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> |
|---|---|
| To: | "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com> |
| Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
| Subject: | Re: Fix LOCK_TIMEOUT handling in slotsync worker |
| Date: | 2025-12-08 07:35:54 |
| Message-ID: | 277F2685-47A7-4C99-8818-5FAF66BD44E3@gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi Zhijie,
Thanks for the patch. The change looks reasonable. ShutDownSlotSync() has set SlotSyncCtx->stopSignaled, and SIGUSR1’s procsignal_sigusr1_handler will 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(dot)fnst(at)fujitsu(dot)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/
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Masahiko Sawada | 2025-12-08 07:36:20 | Re: POC: enable logical decoding when wal_level = 'replica' without a server restart |
| Previous Message | Antonin Houska | 2025-12-08 07:35:53 | Re: Adding REPACK [concurrently] |