pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Use float8 datatype for percentiles in pg_walinspect stat functi 2+ messages / 1 participants [nested] [flat]
* pgsql: Use float8 datatype for percentiles in pg_walinspect stat functi @ 2022-09-12 08:05 Peter Eisentraut <peter@eisentraut.org> 0 siblings, 0 replies; 2+ messages in thread From: Peter Eisentraut @ 2022-09-12 08:05 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/57796a0f15f8fd3c908aa885a7ebb8ae47ce9880 Modified Files -------------- contrib/pg_walinspect/pg_walinspect--1.0.sql | 16 ++++++++-------- contrib/pg_walinspect/pg_walinspect.c | 8 ++++---- doc/src/sgml/pgwalinspect.sgml | 16 ++++++++-------- 3 files changed, 20 insertions(+), 20 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Use float8 datatype for percentiles in pg_walinspect stat functi @ 2022-09-12 08:05 Peter Eisentraut <peter@eisentraut.org> 0 siblings, 0 replies; 2+ messages in thread From: Peter Eisentraut @ 2022-09-12 08:05 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/c8a1bc01c6b05d394d5b6d0e0f594ccf9b46bbcb Modified Files -------------- contrib/pg_walinspect/pg_walinspect--1.0.sql | 16 ++++++++-------- contrib/pg_walinspect/pg_walinspect.c | 8 ++++---- doc/src/sgml/pgwalinspect.sgml | 16 ++++++++-------- 3 files changed, 20 insertions(+), 20 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2022-09-12 08:05 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2022-09-12 08:05 pgsql: Use float8 datatype for percentiles in pg_walinspect stat functi Peter Eisentraut <peter@eisentraut.org> 2022-09-12 08:05 pgsql: Use float8 datatype for percentiles in pg_walinspect stat functi Peter Eisentraut <peter@eisentraut.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox