Content-Length: 260288 | pFad | http://github.com/postgrespro/postgres/commit/129a2f6679fd8891384016b6e2cde6cefda22a7d

EB Fix incorrect pg_stat_io output on 32-bit machines. · postgrespro/postgres@129a2f6 · GitHub
Skip to content

Commit 129a2f6

Browse files
committed
Fix incorrect pg_stat_io output on 32-bit machines.
pg_stat_get_io() applied TimestampTzGetDatum twice to the stat_reset_timestamp value. On 64-bit builds that's harmless because TimestampTzGetDatum is a no-op, but on 32-bit builds it results in displaying garbage in the stats_reset column of the pg_stat_io view. Bug dates to commit a9c70b4 which introduced pg_stat_io, so back-patch to v16 where that came in. Bertrand Drouvot Discussion: https://postgr.es/m/Ztrd+XcPTz1zorkg@ip-10-97-1-34.eu-west-3.compute.internal
1 parent 9e43ab3 commit 129a2f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/utils/adt/pgstatfuncs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1408,7 +1408,7 @@ pg_stat_get_io(PG_FUNCTION_ARGS)
14081408
values[IO_COL_BACKEND_TYPE] = bktype_desc;
14091409
values[IO_COL_CONTEXT] = CStringGetTextDatum(context_name);
14101410
values[IO_COL_OBJECT] = CStringGetTextDatum(obj_name);
1411-
values[IO_COL_RESET_TIME] = TimestampTzGetDatum(reset_time);
1411+
values[IO_COL_RESET_TIME] = reset_time;
14121412

14131413
/*
14141414
* Hard-code this to the value of BLCKSZ for now. Future

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/129a2f6679fd8891384016b6e2cde6cefda22a7d

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy