agora inbox for [email protected]  
help / color / mirror / Atom feed
[PATCH v8 1/5] Zero initialize instr_time uses causing compiler warnings
113+ messages / 3 participants
[nested] [flat]

* [PATCH v8 1/5] Zero initialize instr_time uses causing compiler warnings
@ 2023-01-16 18:04  Andres Freund <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Andres Freund @ 2023-01-16 18:04 UTC (permalink / raw)

These are all not necessary from a correctness POV. However, in a subsequent
patch instr_time will be simplified to an int64, at which point gcc would
otherwise start to warn about the changed places.

Author:
Reviewed-by:
Discussion: https://postgr.es/m/[email protected]
Backpatch:
---
 src/backend/access/transam/xlog.c   | 4 ++++
 src/backend/storage/buffer/bufmgr.c | 4 ++++
 src/backend/storage/file/buffile.c  | 4 ++++
 src/backend/storage/ipc/latch.c     | 2 ++
 src/bin/psql/common.c               | 6 ++++++
 5 files changed, 20 insertions(+)

diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index cc0d9a05d9f..fb4c860bdea 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -2191,6 +2191,8 @@ XLogWrite(XLogwrtRqst WriteRqst, TimeLineID tli, bool flexible)
 				/* Measure I/O timing to write WAL data */
 				if (track_wal_io_timing)
 					INSTR_TIME_SET_CURRENT(start);
+				else
+					INSTR_TIME_SET_ZERO(start);
 
 				pgstat_report_wait_start(WAIT_EVENT_WAL_WRITE);
 				written = pg_pwrite(openLogFile, from, nleft, startoffset);
@@ -8151,6 +8153,8 @@ issue_xlog_fsync(int fd, XLogSegNo segno, TimeLineID tli)
 	/* Measure I/O timing to sync the WAL file */
 	if (track_wal_io_timing)
 		INSTR_TIME_SET_CURRENT(start);
+	else
+		INSTR_TIME_SET_ZERO(start);
 
 	pgstat_report_wait_start(WAIT_EVENT_WAL_SYNC);
 	switch (sync_method)
diff --git a/src/backend/storage/buffer/bufmgr.c b/src/backend/storage/buffer/bufmgr.c
index 8075828e8a6..800a4248c95 100644
--- a/src/backend/storage/buffer/bufmgr.c
+++ b/src/backend/storage/buffer/bufmgr.c
@@ -1017,6 +1017,8 @@ ReadBuffer_common(SMgrRelation smgr, char relpersistence, ForkNumber forkNum,
 
 			if (track_io_timing)
 				INSTR_TIME_SET_CURRENT(io_start);
+			else
+				INSTR_TIME_SET_ZERO(io_start);
 
 			smgrread(smgr, forkNum, blockNum, (char *) bufBlock);
 
@@ -2902,6 +2904,8 @@ FlushBuffer(BufferDesc *buf, SMgrRelation reln)
 
 	if (track_io_timing)
 		INSTR_TIME_SET_CURRENT(io_start);
+	else
+		INSTR_TIME_SET_ZERO(io_start);
 
 	/*
 	 * bufToWrite is either the shared buffer or a copy, as appropriate.
diff --git a/src/backend/storage/file/buffile.c b/src/backend/storage/file/buffile.c
index c5464b6aa62..0a51624df3b 100644
--- a/src/backend/storage/file/buffile.c
+++ b/src/backend/storage/file/buffile.c
@@ -446,6 +446,8 @@ BufFileLoadBuffer(BufFile *file)
 
 	if (track_io_timing)
 		INSTR_TIME_SET_CURRENT(io_start);
+	else
+		INSTR_TIME_SET_ZERO(io_start);
 
 	/*
 	 * Read whatever we can get, up to a full bufferload.
@@ -525,6 +527,8 @@ BufFileDumpBuffer(BufFile *file)
 
 		if (track_io_timing)
 			INSTR_TIME_SET_CURRENT(io_start);
+		else
+			INSTR_TIME_SET_ZERO(io_start);
 
 		bytestowrite = FileWrite(thisfile,
 								 file->buffer.data + wpos,
diff --git a/src/backend/storage/ipc/latch.c b/src/backend/storage/ipc/latch.c
index d79d71a8515..f4123e7de7e 100644
--- a/src/backend/storage/ipc/latch.c
+++ b/src/backend/storage/ipc/latch.c
@@ -1401,6 +1401,8 @@ WaitEventSetWait(WaitEventSet *set, long timeout,
 		Assert(timeout >= 0 && timeout <= INT_MAX);
 		cur_timeout = timeout;
 	}
+	else
+		INSTR_TIME_SET_ZERO(start_time);
 
 	pgstat_report_wait_start(wait_event_info);
 
diff --git a/src/bin/psql/common.c b/src/bin/psql/common.c
index 00627830c47..f907f5d4e8d 100644
--- a/src/bin/psql/common.c
+++ b/src/bin/psql/common.c
@@ -1276,6 +1276,8 @@ DescribeQuery(const char *query, double *elapsed_msec)
 
 	if (timing)
 		INSTR_TIME_SET_CURRENT(before);
+	else
+		INSTR_TIME_SET_ZERO(before);
 
 	/*
 	 * To parse the query but not execute it, we prepare it, using the unnamed
@@ -1406,6 +1408,8 @@ ExecQueryAndProcessResults(const char *query,
 
 	if (timing)
 		INSTR_TIME_SET_CURRENT(before);
+	else
+		INSTR_TIME_SET_ZERO(before);
 
 	if (pset.bind_flag)
 		success = PQsendQueryParams(pset.db, query, pset.bind_nparams, NULL, (const char * const *) pset.bind_params, NULL, NULL, 0);
@@ -1702,6 +1706,8 @@ ExecQueryUsingCursor(const char *query, double *elapsed_msec)
 
 	if (timing)
 		INSTR_TIME_SET_CURRENT(before);
+	else
+		INSTR_TIME_SET_ZERO(before);
 
 	/* if we're not in a transaction, start one */
 	if (PQtransactionStatus(pset.db) == PQTRANS_IDLE)
-- 
2.38.0


--vt42kbp2j7rjcapp
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
	filename="v8-0002-instr_time-Represent-time-as-an-int64-on-all-plat.patch"



^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 06:31  Bertrand Drouvot <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 06:31 UTC (permalink / raw)

Multiplying by 0.001 can produce trailing-digit noise in displayed
values (for example 0.009000000000000001 instead of 0.009, should extra_float_digits
not being set to 0) because 0.001 cannot be represented exactly in binary floating
point.

Use division by 1000.0 instead as it is the most common way to deal with such
computation in the code tree.

Author: Bertrand Drouvot <[email protected]>
---
 src/backend/utils/adt/pgstatfuncs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 100.0% src/backend/utils/adt/

diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c
index 6f9c9c72de5..1e5f8293b28 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1457,7 +1457,7 @@ pgstat_get_io_time_index(IOOp io_op)
 static inline double
 pg_stat_us_to_ms(PgStat_Counter val_ms)
 {
-	return val_ms * (double) 0.001;
+	return (double) val_ms / 1000.0;
 }
 
 /*
-- 
2.34.1


--TXuqZKQhWXLuSKvO--





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 07:02  Bertrand Drouvot <[email protected]>
  0 siblings, 1 reply; 113+ messages in thread

From: Bertrand Drouvot @ 2026-06-29 07:02 UTC (permalink / raw)
  To: [email protected]

Hi hackers,

while reviewing [1], I noticed that the IO timings displayed in pg_stat_io can 
produce floating-point noise like:

postgres=# select read_time from pg_stat_io where read_time > 0;
      read_time
---------------------
  2.2640000000000002
 0.08700000000000001

That's because 0.001 cannot be represented exactly in binary floating
point. I think this output looks weird, even if understandable. Note that with
extra_float_digits set to 0 you don't see the noise (but 1 is the default).

The attached patch changes pg_stat_us_to_ms() so that it uses a division
by 1000.0 instead as it's correctly rounded, see for example:

postgres=# SELECT (9 * 0.001::float8)::text;
         text
----------------------
 0.009000000000000001
(1 row)

postgres=# SELECT (9::float8 / 1000.0)::text;
 text
-------
 0.009
(1 row)

Given that / 1000.0 is the most common way to do this kind of computation in the
code tree, I think that it makes sense to update pg_stat_us_to_ms() to do so.

Thoughts?

[1]: https://www.postgresql.org/message-id/akH0SxXlXPNjD%2BR5%40bdtpg

Regards,

-- 
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com


^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* Re: Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-07-01 09:05  John Naylor <[email protected]>
  parent: Bertrand Drouvot <[email protected]>
  0 siblings, 1 reply; 113+ messages in thread

From: John Naylor @ 2026-07-01 09:05 UTC (permalink / raw)
  To: Bertrand Drouvot <[email protected]>; +Cc: [email protected]

On Mon, Jun 29, 2026 at 2:02 PM Bertrand Drouvot
<[email protected]> wrote:
>
> Hi hackers,
>
> while reviewing [1], I noticed that the IO timings displayed in pg_stat_io can
> produce floating-point noise like:
>
> postgres=# select read_time from pg_stat_io where read_time > 0;
>       read_time
> ---------------------
>   2.2640000000000002
>  0.08700000000000001
>
> That's because 0.001 cannot be represented exactly in binary floating
> point. I think this output looks weird, even if understandable. Note that with
> extra_float_digits set to 0 you don't see the noise (but 1 is the default).

Yes, multiplying by that constant also multiplies the rounding error.

> Given that / 1000.0 is the most common way to do this kind of computation in the
> code tree, I think that it makes sense to update pg_stat_us_to_ms() to do so.

+1, I'll take care of this.

--
John Naylor
Amazon Web Services





^ permalink  raw  reply  [nested|flat] 113+ messages in thread

* Re: Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-07-02 06:38  John Naylor <[email protected]>
  parent: John Naylor <[email protected]>
  0 siblings, 0 replies; 113+ messages in thread

From: John Naylor @ 2026-07-02 06:38 UTC (permalink / raw)
  To: Bertrand Drouvot <[email protected]>; +Cc: [email protected]

On Wed, Jul 1, 2026 at 4:05 PM John Naylor <[email protected]> wrote:
>
> On Mon, Jun 29, 2026 at 2:02 PM Bertrand Drouvot
> <[email protected]> wrote:
> > Given that / 1000.0 is the most common way to do this kind of computation in the
> > code tree, I think that it makes sense to update pg_stat_us_to_ms() to do so.
>
> +1, I'll take care of this.

Pushed.

--
John Naylor
Amazon Web Services






^ permalink  raw  reply  [nested|flat] 113+ messages in thread


end of thread, other threads:[~2026-07-02 06:38 UTC | newest]

Thread overview: 113+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-01-16 18:04 [PATCH v8 1/5] Zero initialize instr_time uses causing compiler warnings Andres Freund <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 06:31 [PATCH v1] Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-06-29 07:02 Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
2026-07-01 09:05 ` Re: Fix floating-point noise in pg_stat_us_to_ms() John Naylor <[email protected]>
2026-07-02 06:38   ` Re: Fix floating-point noise in pg_stat_us_to_ms() John Naylor <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox