agora inbox for [email protected]  
help / color / mirror / Atom feed
[PATCH v20260912 2/4] Continue to remove some unnecesary strlen calls
145+ messages / 3 participants
[nested] [flat]

* [PATCH v20260912 2/4] Continue to remove some unnecesary strlen calls
@ 2024-09-11 04:21 Andy Fan <[email protected]>
  0 siblings, 0 replies; 145+ messages in thread

From: Andy Fan @ 2024-09-11 04:21 UTC (permalink / raw)

sprintf return the number of characters printed (not including the
trailing `\0'), so it is exactly same as strlen. so we can reuse that
value and avoid a strlen call.
---
 src/backend/utils/adt/datetime.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/src/backend/utils/adt/datetime.c b/src/backend/utils/adt/datetime.c
index 8f25c15fcfc..83c3c85305b 100644
--- a/src/backend/utils/adt/datetime.c
+++ b/src/backend/utils/adt/datetime.c
@@ -4717,6 +4717,7 @@ EncodeInterval(struct pg_itm *itm, int style, char *str)
 	int			fsec = itm->tm_usec;
 	bool		is_before = false;
 	bool		is_zero = true;
+	int			data_len;
 
 	/*
 	 * The sign of year and month are guaranteed to match, since they are
@@ -4774,11 +4775,11 @@ EncodeInterval(struct pg_itm *itm, int style, char *str)
 					char		sec_sign = (hour < 0 || min < 0 ||
 											sec < 0 || fsec < 0) ? '-' : '+';
 
-					sprintf(cp, "%c%d-%d %c%" PRId64 " %c%" PRId64 ":%02d:",
+					data_len = sprintf(cp, "%c%d-%d %c%" PRId64 " %c%" PRId64 ":%02d:",
 							year_sign, abs(year), abs(mon),
 							day_sign, i64abs(mday),
 							sec_sign, i64abs(hour), abs(min));
-					cp += strlen(cp);
+					cp += data_len;
 					cp = AppendSeconds(cp, sec, fsec, MAX_INTERVAL_PRECISION, true);
 					*cp = '\0';
 				}
@@ -4788,16 +4789,16 @@ EncodeInterval(struct pg_itm *itm, int style, char *str)
 				}
 				else if (has_day)
 				{
-					sprintf(cp, "%" PRId64 " %" PRId64 ":%02d:",
+					data_len = sprintf(cp, "%" PRId64 " %" PRId64 ":%02d:",
 							mday, hour, min);
-					cp += strlen(cp);
+					cp += data_len;
 					cp = AppendSeconds(cp, sec, fsec, MAX_INTERVAL_PRECISION, true);
 					*cp = '\0';
 				}
 				else
 				{
-					sprintf(cp, "%" PRId64 ":%02d:", hour, min);
-					cp += strlen(cp);
+					data_len = sprintf(cp, "%" PRId64 ":%02d:", hour, min);
+					cp += data_len;
 					cp = AppendSeconds(cp, sec, fsec, MAX_INTERVAL_PRECISION, true);
 					*cp = '\0';
 				}
-- 
2.43.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: attachment;
 filename=v20260912-0004-Make-printtup-a-bit-faster-intermediate-st.patch



^ permalink  raw  reply  [nested|flat] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ 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; 145+ 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] 145+ messages in thread

* Fix floating-point noise in pg_stat_us_to_ms()
@ 2026-06-29 07:02 Bertrand Drouvot <[email protected]>
  2026-07-01 09:05 ` Re: Fix floating-point noise in pg_stat_us_to_ms() John Naylor <[email protected]>
  0 siblings, 1 reply; 145+ 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] 145+ messages in thread

* Re: Fix floating-point noise in pg_stat_us_to_ms()
  2026-06-29 07:02 Fix floating-point noise in pg_stat_us_to_ms() Bertrand Drouvot <[email protected]>
@ 2026-07-01 09:05 ` John Naylor <[email protected]>
  2026-07-02 06:38   ` Re: Fix floating-point noise in pg_stat_us_to_ms() John Naylor <[email protected]>
  0 siblings, 1 reply; 145+ 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] 145+ messages in thread

* Re: Fix floating-point noise in pg_stat_us_to_ms()
  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   ` John Naylor <[email protected]>
  0 siblings, 0 replies; 145+ 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] 145+ messages in thread


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

Thread overview: 145+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-09-11 04:21 [PATCH v20260912 2/4] Continue to remove some unnecesary strlen calls Andy Fan <[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 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