agora inbox for pgsql-committers@postgresql.org
help / color / mirror / Atom feedFrom: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Change stat_lock.wait_time to double precision
Date: Tue, 30 Jun 2026 03:48:14 +0000
Message-ID: <E1wePSI-000jVZ-2Q@gemulon.postgresql.org> (raw)
Change stat_lock.wait_time to double precision
Other statistics views (pg_stat_io, pg_stat_database, etc.) use float8
for all measured-time columns, the new pg_stat_lock standing out as an
outlier by using bigint.
This commit aligns pg_stat_lock with the other stats views for
consistency. Like pg_stat_io, the time is stored in microseconds, and
is displayed in milliseconds with a conversion done when the view is
queried.
While on it, replace a use of "long" by PgStat_Counter, the former could
overflow for large wait times where sizeof(long) is 4 bytes (aka WIN32).
Bump catalog version.
Author: Tatsuya Kawata <kawatatatsuya0913@gmail.com>
Reviewed-by: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/CAHza6qerEiQehrbW5xaXyxvR0qJe3KBX1R4kocDz1+7Ygu8x-g@mail.gmail.com
Backpatch-through: 19
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/c776550e4662385b0ebeac653ae86755008d29f3
Modified Files
--------------
doc/src/sgml/monitoring.sgml | 2 +-
src/backend/storage/lmgr/proc.c | 9 +++++----
src/backend/utils/activity/pgstat_lock.c | 4 ++--
src/backend/utils/adt/pgstatfuncs.c | 2 +-
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_proc.dat | 2 +-
src/include/pgstat.h | 5 +++--
7 files changed, 14 insertions(+), 12 deletions(-)
view thread (4+ messages)
Message-ID: <E1wePSI-000jVZ-2Q@gemulon.postgresql.org>
Permalink: ../E1wePSI-000jVZ-2Q@gemulon.postgresql.org/
Also on: postgresql.org/message-id/E1wePSI-000jVZ-2Q@gemulon.postgresql.org
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Change stat_lock.wait_time to double precision
In-Reply-To: <E1wePSI-000jVZ-2Q@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox