]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Use float8 datatype for percentiles in pg_walinspect stat functions
authorPeter Eisentraut <peter@eisentraut.org>
Mon, 12 Sep 2022 07:38:07 +0000 (09:38 +0200)
committerPeter Eisentraut <peter@eisentraut.org>
Mon, 12 Sep 2022 07:38:07 +0000 (09:38 +0200)
commitc8a1bc01c6b05d394d5b6d0e0f594ccf9b46bbcb
treebd38ac76a96a0f6783ba37980f0402ca3cf7a0f3
parent44a51dc990cc39fcd5ae6359bf1e27bd6699449b
Use float8 datatype for percentiles in pg_walinspect stat functions

pg_walinspect uses datatype double (double precision floating point
number) for WAL stats percentile calculations and expose them via
float4 (single precision floating point number), which an unnecessary
loss of precision and confusing. Even though, it's harmless that way,
let's use float8 (double precision floating-point number) to be in
sync with what pg_walinspect does internally and what it exposes to
the users. This seems to be the pattern used elsewhere in the code.

Reported-by: Peter Eisentraut
Author: Bharath Rupireddy
Reviewed-by: Peter Eisentraut
Discussion: https://www.postgresql.org/message-id/36ee692b-232f-0484-ce94-dc39d82021ad%40enterprisedb.com
contrib/pg_walinspect/pg_walinspect--1.0.sql
contrib/pg_walinspect/pg_walinspect.c
doc/src/sgml/pgwalinspect.sgml