Re: pg_test_timing: fix unit typo and widen diff type

From: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: "wang(dot)xiao(dot)peng" <wxp_728(at)163(dot)com>, lukas(at)fittl(dot)com, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Hannu Krosing <hannuk(at)google(dot)com>
Subject: Re: pg_test_timing: fix unit typo and widen diff type
Date: 2026-04-24 03:30:10
Message-ID: B034BD3B-DD95-4D89-AAB2-1C3B5F5D3C2D@gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On Apr 24, 2026, at 11:15, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
>
> On Thu, Apr 23, 2026 at 11:03 AM Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> wrote:
>> I just checked old branches. Looks like 0001 can be back-patched down to v10. Yes, pre-19, all branches use microsecond, so the back-patch should change “ms” to “us”.
>
> Thanks! So I've pushed this unit change to master and backpatched it to
> all supported branches.
>
>
>> For v16 to v18, we can make a tiny improvement by replacing “1e9” with a constant macro NS_PER_S. This change has been included in the diff.
>
> This change looks good to me. However, we should generally keep changes to
> old stable branches to the minimum required, so I applied this change only
> to master with 0002 patch.
>
>
>> I see 0002 a bit differently. In v19, the unit changed from microseconds to nanoseconds, which introduced a potential overflow: nanoseconds require int64, but the local variable remained int32. So I think this is actually a v19-only bug.
>
> OK, I've pushed 0002 patch. Thanks!
>
> Regards,
>
> --
> Fujii Masao

Hi Fujii-san, thank you very much for pushing.

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message wenhui qiu 2026-04-24 03:57:40 Re: New vacuum config to avoid anti wraparound vacuums
Previous Message Fujii Masao 2026-04-24 03:15:50 Re: pg_test_timing: fix unit typo and widen diff type