Re: Make wal_receiver_timeout configurable per subscription

Fujii Masao <masao.fujii@gmail.com>

From: Fujii Masao <masao.fujii@gmail.com>
To: Japin Li <japinli@hotmail.com>
Cc: Chao Li <li.evan.chao@gmail.com>, 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-13T15:52:56Z
Lists: pgsql-hackers

Attachments

On Fri, Feb 6, 2026 at 3:44 PM Japin Li <japinli@hotmail.com> wrote:
> 1.
> Typo, s/timeeout/timeout/g.

Fixed. Thanks for the review!


> 2.
> The comment mentions skipping only "-1".
> Since we already use strcmp(... , "-1") later in the code, wouldn't it be
> better to use the same check here too?

With this approach, a command like CREATE SUBSCRIPTION using
a wal_receiver_timeout value such as '-1 ' (i.e., -1 followed by whitespace)
would fail, since it would not be interpreted as -1. I don't think that's
desirable behavior. So it would be better to use parse_int() so that
such input is handled correctly.

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 →
  1. Add per-subscription wal_receiver_timeout setting.

  2. Make GUC wal_receiver_timeout user-settable.