pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Use float8 datatype for percentiles in pg_walinspect stat functi
Date: Mon, 12 Sep 2022 08:05:01 +0000
Message-ID: <E1oXeRA-002Yvd-HU@gemulon.postgresql.org> (raw)

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(-)



view thread (2+ messages)  latest in thread

Message-ID: <E1oXeRA-002Yvd-HU@gemulon.postgresql.org>
Permalink:  ../E1oXeRA-002Yvd-HU@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1oXeRA-002Yvd-HU@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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: peter@eisentraut.org
  Subject: Re: pgsql: Use float8 datatype for percentiles in pg_walinspect stat functi
  In-Reply-To: <E1oXeRA-002Yvd-HU@gemulon.postgresql.org>
  References: <E1oXeRA-002Yvd-HU@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 DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox