Re: Make wal_receiver_timeout configurable per subscription

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Japin Li <japinli(at)hotmail(dot)com>
Cc: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, vignesh C <vignesh21(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Make wal_receiver_timeout configurable per subscription
Date: 2026-02-13 15:52:56
Message-ID: CAHGQGwGt57NZi8=rc0y4-7+DB5=Yy87M7S+XsRp-z01e76dO2Q@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Feb 6, 2026 at 3:44 PM Japin Li <japinli(at)hotmail(dot)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

Attachment Content-Type Size
v5-0001-Make-GUC-wal_receiver_timeout-user-settable.patch application/octet-stream 2.1 KB
v5-0002-Add-per-subscription-wal_receiver_timeout-setting.patch application/octet-stream 73.2 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2026-02-13 15:58:06 Re: AIX support
Previous Message Fujii Masao 2026-02-13 15:51:37 Re: Make wal_receiver_timeout configurable per subscription