Re: Make wal_receiver_timeout configurable per subscription
Fujii Masao <masao.fujii@gmail.com>
From: Fujii Masao <masao.fujii@gmail.com>
To: Chao Li <li.evan.chao@gmail.com>
Cc: Fujii Masao <masao.fujii@oss.nttdata.com>,
Amit Kapila <amit.kapila16@gmail.com>, vignesh C <vignesh21@gmail.com>, Michael Paquier <michael@paquier.xyz>, Robert Haas <robertmhaas@gmail.com>, pgsql-hackers@lists.postgresql.org
Date: 2026-02-16T07:48:49Z
Lists: pgsql-hackers
Attachments
- v6-0001-Make-GUC-wal_receiver_timeout-user-settable.patch (application/octet-stream) patch v6-0001
- v6-0002-Add-per-subscription-wal_receiver_timeout-setting.patch (application/octet-stream) patch v6-0002
On Sat, Feb 14, 2026 at 8:37 AM Chao Li <li.evan.chao@gmail.com> wrote: > I realized atoi(“-1invalid”) would return -1, but I thought that would be an imagined use case. I’m fine if you insist to use parse_int. Maybe we can enhance the comment. set_config_option does the test and parse_int is used to skip -1. IMO the current comment is sufficient, so I left it unchanged. + /* 180000 should be changed to 190000 */ + if (pset.sversion >= 180000) + appendPQExpBuffer(&buf, Since I started the patch before v19dev was created, I temporarily used 180000 and planned to update it to 190000 later, but forgot to do so. This is now fixed. + /* + * Log the current wal_receiver_timeout GUC value (in milliseconds) as a + * debug message to verify it was set correctly. + */ + elog(DEBUG1, "logical replication worker for subscription \"%s\" wal_receiver_timeout: %d ms", + MySubscription->name, wal_receiver_timeout); Previously, this debug message was emitted every time set_wal_receiver_timeout() was called, even when the value had not changed. For example, ALTER SUBSCRIPTION ... SET (synchronous_commit = true) would trigger the message, which seemed strange. I updated the code so the message is logged only when the effective wal_receiver_timeout value used by the worker actually changes. Attached are the updated patches. Regards, -- Fujii Masao
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Add per-subscription wal_receiver_timeout setting.
- fb80f388f4a1 19 (unreleased) landed
-
Make GUC wal_receiver_timeout user-settable.
- 8a6af3ad0879 19 (unreleased) landed