diff options
author | Michael Paquier <michael@paquier.xyz> | 2025-01-10 09:00:48 +0900 |
---|---|---|
committer | Michael Paquier <michael@paquier.xyz> | 2025-01-10 09:00:48 +0900 |
commit | 2c14037bb57c091b9f0bcbd36fa62138601beb55 (patch) | |
tree | 78d8895f3bb93a7e5466d83ade223e8798bca791 /src/backend/utils/adt/pgstatfuncs.c | |
parent | 39e3bcae44868734504c3decbb6708c36a5a84b2 (diff) | |
download | postgresql-2c14037bb57c091b9f0bcbd36fa62138601beb55.tar.gz postgresql-2c14037bb57c091b9f0bcbd36fa62138601beb55.zip |
Refactor some code related to backend statistics
This commit changes the way pending backend statistics are tracked by
moving them into a new structure called PgStat_BackendPending, removing
PgStat_BackendPendingIO. PgStat_BackendPending currently only includes
PgStat_PendingIO for the pending I/O stats.
pgstat_flush_backend() is extended with a "flags" argument to control
which parts of the stats of a backend should be flushed.
With this refactoring, it becomes easier to plug into backend statistics
more data. A patch to add information related to WAL in this stats kind
is under discussion.
Author: Bertrand Drouvot
Discussion: https://postgr.es/m/Z3zqc4o09dM/Ezyz@ip-10-97-1-34.eu-west-3.compute.internal
Diffstat (limited to 'src/backend/utils/adt/pgstatfuncs.c')
-rw-r--r-- | src/backend/utils/adt/pgstatfuncs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c index 3245f3a8d8a..5f8d20a406d 100644 --- a/src/backend/utils/adt/pgstatfuncs.c +++ b/src/backend/utils/adt/pgstatfuncs.c @@ -1544,7 +1544,7 @@ pg_stat_get_backend_io(PG_FUNCTION_ARGS) if (bktype == B_INVALID) return (Datum) 0; - bktype_stats = &backend_stats->stats; + bktype_stats = &backend_stats->io_stats; /* * In Assert builds, we can afford an extra loop through all of the |