Re: [PATCH] Change wait_time column of pg_stat_lock to double precision - Mailing list pgsql-hackers

From Kyotaro Horiguchi
Subject Re: [PATCH] Change wait_time column of pg_stat_lock to double precision
Date
Msg-id 20260615.163922.867911836681097947.horikyota.ntt@gmail.com
Whole thread
In response to [PATCH] Change wait_time column of pg_stat_lock to double precision  (Tatsuya Kawata <kawatatatsuya0913@gmail.com>)
Responses Re: [PATCH] Change wait_time column of pg_stat_lock to double precision
Re: [PATCH] Change wait_time column of pg_stat_lock to double precision
List pgsql-hackers
Hello.

At Mon, 15 Jun 2026 15:54:24 +0900, Tatsuya Kawata <kawatatatsuya0913@gmail.com> wrote in 
> While looking at the lock-related code, I noticed that pg_stat_lock
> is the only statistics view whose timing column (wait_time) uses
> bigint.  Every other statistics view uses double precision for
> measured-time columns.  I do not see a reason for pg_stat_lock to
> differ.

It seems to me that this was intentional. As described in the
documentation, since wait_time is only accumulated for waits longer
than deadlock_timeout, sub-millisecond precision was probably not
considered particularly useful.

Regards,

-- 
Kyotaro Horiguchi
NTT Open Source Software Center



pgsql-hackers by date:

Previous
From: Chao Li
Date:
Subject: Re: postgres_fdw: fix cumulative stats after imported foreign-table stats
Next
From: Akshay Joshi
Date:
Subject: Re: [PATCH] Add pg_get_table_ddl() to reconstruct CREATE TABLE statements