pg_walinspect float4/float8 confusion

From: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: pg_walinspect float4/float8 confusion
Date: 2022-09-08 11:53:10
Message-ID: 36ee692b-232f-0484-ce94-dc39d82021ad@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

The pg_walinspect function pg_get_wal_stats() has output arguments
declared as float4 (count_percentage, record_size_percentage, etc.), but
the internal computations are all done in type double. Is there a
reason why this is then converted to float4 for output? It probably
doesn't matter in practice, but it seems unnecessarily confusing. Or at
least add a comment so it doesn't look like an accident. Also compare
with pgstattuple, which uses float8 in its SQL interface for similar data.

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2022-09-08 12:03:47 ATExecAddColumn() doesn't merge inherited properties
Previous Message Bharath Rupireddy 2022-09-08 11:46:53 Re: Switching XLog source from archive to streaming when primary available