Re: BUG #19950: pg_terminate_backend rejects a positive bigint timeout as negative

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>
Cc: "imchifan(at)163(dot)com" <imchifan(at)163(dot)com>, "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #19950: pg_terminate_backend rejects a positive bigint timeout as negative
Date: 2026-11-26 04:18:43
Message-ID: CAApHDvpyp-6tL8wX1vn-4xYKtRan266eE5CXBYefFdi+UvKnaw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Thu, 26 Nov 2026 at 15:21, Hayato Kuroda (Fujitsu)
<kuroda(dot)hayato(at)fujitsu(dot)com> wrote:
> Hmm. Personally, I feel nobody will input such a huge timeout value, but codes in
> other parts try to accept it. PSA the fix patch.
> I checked [1] but could not find reasoning that timeout should be int32 or int64.

I can't think of why it would ever be valid to assign the result of
PG_GETARG_INT64() to an int. It would at least have to have a cast and
a comment explaining why it's valid, at least.

I've pushed your patch.

David

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Rajesh Kumar Thandapani 2026-11-26 04:20:55 Re: Lost walsender wakeup stalls synchronous commits until the standby's next reply (16+)
Previous Message Tender Wang 2026-11-26 03:56:06 Re: BUG #19929: RETURNING OLD/NEW: segfault when used only inside a hashed subplan