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

From: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
To: kawatatatsuya0913(at)gmail(dot)com
Cc: 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-15 07:39:22
Message-ID: 20260615.163922.867911836681097947.horikyota.ntt@gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello.

At Mon, 15 Jun 2026 15:54:24 +0900, Tatsuya Kawata <kawatatatsuya0913(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Akshay Joshi 2026-06-15 07:52:03 Re: [PATCH] Add pg_get_table_ddl() to reconstruct CREATE TABLE statements
Previous Message Chao Li 2026-06-15 07:36:32 Re: postgres_fdw: fix cumulative stats after imported foreign-table stats