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 <[email protected]> Reviewed-by: Bertrand Drouvot <[email protected]> Reviewed-by: Michael Paquier <[email protected]> Discussion: https://postgr.es/m/cahza6qereiqehrbw5xaxyxvr0qje3kbx1r4kocdz1+7ygu8...@mail.gmail.com Backpatch-through: 19 Branch ------ REL_19_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/ff6f6e0470ecb362a389bb20aac46a843e496c2f 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(-)
