Re: Make wal_receiver_timeout configurable per subscription

From: Srinath Reddy Sadipiralla <srinath2133(at)gmail(dot)com>
To: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Make wal_receiver_timeout configurable per subscription
Date: 2025-05-16 16:47:28
Message-ID: CAFC+b6raBWpRNSfg8PdXyzooPNAj7JBgGz_XMgH2+uNddEygZg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, May 16, 2025 at 9:11 PM Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
wrote:

> 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.
>
>
Hi,+1 for the idea.

>
> 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?

Both ways LGTM,for starters we can go with changing GUC's context.

> BTW, this could be extended in the future to other GUCs used by
> logical replication workers, such as wal_retrieve_retry_interval.
>
>
+1 for extending this idea for other GUCs as well.

--
Thanks,
Srinath Reddy Sadipiralla
EDB: https://www.enterprisedb.com/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jelte Fennema-Nio 2025-05-16 17:45:01 Re: Proposal: Make cfbot fail on patches not created by "git format-patch"
Previous Message Jacob Champion 2025-05-16 16:24:10 Re: Proposal: Make cfbot fail on patches not created by "git format-patch"