v6-0001-Make-GUC-wal_receiver_timeout-user-settable.patch
application/octet-stream
Filename: v6-0001-Make-GUC-wal_receiver_timeout-user-settable.patch
Type: application/octet-stream
Part: 0
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: format-patch
Series: patch v6-0001
Subject: Make GUC wal_receiver_timeout user-settable.
| File | + | − |
|---|---|---|
| doc/src/sgml/config.sgml | 0 | 3 |
| src/backend/utils/misc/guc_parameters.dat | 1 | 1 |
From 4684ac218279115f718b828b551d2fda61cf01e7 Mon Sep 17 00:00:00 2001
From: Fujii Masao <fujii@postgresql.org>
Date: Thu, 23 Oct 2025 16:42:37 +0900
Subject: [PATCH v6 1/2] Make GUC wal_receiver_timeout user-settable.
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, previously
this wasn't possible, which limited flexibility in managing subscriptions.
This commit changes wal_receiver_timeout to be user-settable,
allowing different values to be assigned using ALTER ROLE SET for
each subscription owner. This effectively enables per-subscription
configuration.
---
doc/src/sgml/config.sgml | 3 ---
src/backend/utils/misc/guc_parameters.dat | 2 +-
2 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index 6bc2690ce07..a2aa7499f43 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -5240,9 +5240,6 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class="
If this value is specified without units, it is taken as milliseconds.
The default value is 60 seconds.
A value of zero disables the timeout mechanism.
- This parameter can only be set in
- the <filename>postgresql.conf</filename> file or on the server
- command line.
</para>
</listitem>
</varlistentry>
diff --git a/src/backend/utils/misc/guc_parameters.dat b/src/backend/utils/misc/guc_parameters.dat
index 271c033952e..9507778415d 100644
--- a/src/backend/utils/misc/guc_parameters.dat
+++ b/src/backend/utils/misc/guc_parameters.dat
@@ -3413,7 +3413,7 @@
max => 'INT_MAX / 1000',
},
-{ name => 'wal_receiver_timeout', type => 'int', context => 'PGC_SIGHUP', group => 'REPLICATION_STANDBY',
+{ name => 'wal_receiver_timeout', type => 'int', context => 'PGC_USERSET', group => 'REPLICATION_STANDBY',
short_desc => 'Sets the maximum wait time to receive data from the sending server.',
long_desc => '0 disables the timeout.',
flags => 'GUC_UNIT_MS',
--
2.51.2