Make wal_receiver_timeout configurable per subscription
Fujii Masao <masao.fujii@oss.nttdata.com>
From: Fujii Masao <masao.fujii@oss.nttdata.com>
To: pgsql-hackers@lists.postgresql.org
Date: 2025-05-16T15:40:53Z
Lists: pgsql-hackers
Hi, When multiple subscribers connect to different publisher servers, it can be useful to set different wal_receiver_timeout values for each connection to better detect failures. However, this isn't currently possible, which limits flexibility in managing subscriptions. To address this, I'd like to propose making wal_receiver_timeout configurable per subscription. One approach is to add wal_receiver_timeout as a parameter to CREATE SUBSCRIPTION command, storing it in pg_subscription so each logical replication worker can use its specific value. Another option is to change the wal_receiver_timeout's GUC context from PGC_SIGHUP to PGC_USERSET. This would allow setting different values via ALTER ROLE SET command for each subscription owner - effectively enabling per-subscription configuration. Since this approach is simpler and likely sufficient, I'd prefer starting with this. Thought? BTW, this could be extended in the future to other GUCs used by logical replication workers, such as wal_retrieve_retry_interval. Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION
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