Re: [PATCH] Change wait_time column of pg_stat_lock to double precision

From: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Tatsuya Kawata <kawatatatsuya0913(at)gmail(dot)com>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: [PATCH] Change wait_time column of pg_stat_lock to double precision
Date: 2026-06-29 07:06:36
Message-ID: akIZfBWsdbfTv2cl@bdtpg
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jun 29, 2026 at 04:56:11AM +0000, Bertrand Drouvot wrote:
> Hi,
>
> On Mon, Jun 29, 2026 at 01:52:54PM +0900, Michael Paquier wrote:
> > On Mon, Jun 29, 2026 at 04:27:55AM +0000, Bertrand Drouvot wrote:
> > > postgres=# select read_time from pg_stat_io where read_time > 0;
> > > read_time
> > > ---------------------
> > > 2.2640000000000002
> > > 0.08700000000000001
> > >
> > > Maybe it should be changed to?
> >
> > pg_stat_io with track_io_timing enabled shows the same thing.
>
> Yeah, I agree, my query above is querying pg_stat_io. I agree that it makes
> sense to have both using pg_stat_us_to_ms(), I'm just wondering if pg_stat_us_to_ms()
> should be changed as I did propose.

FWIW, I just created a dedicated thread [1] for this (to not deviate from the
original purpose of this one).

[1]: https://postgr.es/m/akIYkMK4bHe9qX/N%40bdtpg

Regards,

--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Chao Li 2026-06-29 07:20:24 Fix GROUP BY ALL handling of ORDER BY operator semantics
Previous Message Bertrand Drouvot 2026-06-29 07:02:40 Fix floating-point noise in pg_stat_us_to_ms()