aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2025-03-19 08:52:10 +0900
committerMichael Paquier <michael@paquier.xyz>2025-03-19 08:52:10 +0900
commit17d8bba6dad12e14a7cafca9ef5eef21e577e9c3 (patch)
tree41332c0f7b363ddeffe8e5c7aad716f8e7a39406 /src
parentf4290f20dd4d6f75e01fbb87304c3b8f31d1cfea (diff)
downloadpostgresql-17d8bba6dad12e14a7cafca9ef5eef21e577e9c3.tar.gz
postgresql-17d8bba6dad12e14a7cafca9ef5eef21e577e9c3.zip
Fix copy-paste error related to the autovacuum launcher in pgstat_io.c
Autovacuum launchers perform no WAL IO reads, but pgstat_tracks_io_op() was tracking them as an allowed combination for the "init" and "normal" contexts. This caused the "read", "read_bytes" and "read_time" attributes of pg_stat_io to show zeros for the autovacuum launcher rather than NULL. NULL means that a combination of IO object, IO context and IO operation has no meaning for a backend type. Zero is the same as telling that a combination is relevant, and that WAL reads are possible in an autovacuum launcher, but it is not relevant. Copy-pasto introduced in a051e71e28a1. Author: Ranier Vilela <ranier.vf@gmail.com> Reviewed-by: Nazir Bilal Yavuz <byavuz81@gmail.com> Discussion: https://postgr.es/m/CAEudQAopEMAPiUqE7BvDV+x2fUPmKmb9RrsaoDR+hhQzLKg4PQ@mail.gmail.com
Diffstat (limited to 'src')
-rw-r--r--src/backend/utils/activity/pgstat_io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/utils/activity/pgstat_io.c b/src/backend/utils/activity/pgstat_io.c
index c8de9c9e2d3..d8d26379a57 100644
--- a/src/backend/utils/activity/pgstat_io.c
+++ b/src/backend/utils/activity/pgstat_io.c
@@ -512,7 +512,7 @@ pgstat_tracks_io_op(BackendType bktype, IOObject io_object,
*/
if (io_object == IOOBJECT_WAL && io_op == IOOP_READ &&
(bktype == B_WAL_RECEIVER || bktype == B_BG_WRITER ||
- bktype == B_AUTOVAC_WORKER || bktype == B_AUTOVAC_WORKER ||
+ bktype == B_AUTOVAC_LAUNCHER || bktype == B_AUTOVAC_WORKER ||
bktype == B_WAL_WRITER))
return false;