You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
New monitoring metric in PostgreSQL 16: pg_stat_io #324
pg_stat_io:
Rows of the view show IO operations for a particular backend type, IO target
object, IO context combination (e.g. a client backend's operations on
permanent relations in shared buffers) and each column in the view is the
total number of IO Operations done (e.g. writes). So a cell in the view would
be, for example, the number of blocks of relation data written from shared
buffers by client backends since the last stats reset.
I'm pulling that out via a stat that specific to the backend_type = backend writer. That seems like a good way to split these IO metrics up for better usability. Might also be able to break it down further by context as a label too
postgres=# select backend_type from pg_stat_io group by 1;
backend_type
---------------------
autovacuum launcher
autovacuum worker
background worker
background writer
checkpointer
client backend
standalone backend
startup
walsender
Convert the reads/writes blocks columns to bytes. Just add it as an additional column/metric so people can parse blocks too if they really want to. Example output
Activity
hunleyd commentedon Jun 4, 2023
two good examples of what to report on in https://postgrespro.com/blog/pgsql/5970086 as well
keithf4 commentedon Sep 13, 2024
So the PG17 changes required gathering some BGW stats from pg_stat_io since they were removed from the pg_stat_bgwriter catalog.
#429
I'm pulling that out via a stat that specific to the
backend_type=backend writer. That seems like a good way to split these IO metrics up for better usability. Might also be able to break it down further bycontextas a label tookeithf4 commentedon Sep 13, 2024
Convert the reads/writes blocks columns to bytes. Just add it as an additional column/metric so people can parse blocks too if they really want to. Example output