The pg_stat_bgwriter view will always have a single row, containing data about the background writer of the cluster.
Table 27.24. pg_stat_bgwriter View
Column TypeDescription
buffers_cleanbigintNumber of buffers written by the background writer
maxwritten_cleanbigintNumber of times the background writer stopped a cleaning scan because it had written too many buffers
buffers_allocbigintNumber of buffers allocated
stats_resettimestamp with time zoneTime at which these statistics were last reset
27.2.15. pg_stat_checkpointer
The pg_stat_checkpointer view will always have a single row, containing data about the checkpointer process of the cluster.
Table 27.25. pg_stat_checkpointer View
Column TypeDescription
num_timedbigintNumber of scheduled checkpoints that have been performed
num_requestedbigintNumber of requested checkpoints that have been performed
restartpoints_timedbigintNumber of scheduled restartpoints due to timeout or after a failed attempt to perform it
restartpoints_reqbigintNumber of requested restartpoints
restartpoints_donebigintNumber of restartpoints that have been performed
write_timedouble precisionTotal amount of time that has been spent in the portion of processing checkpoints and restartpoints where files are written to disk, in milliseconds
sync_timedouble precisionTotal amount of time that has been spent in the portion of processing checkpoints and restartpoints where files are synchronized to disk, in milliseconds
buffers_writtenbigintNumber of buffers written during checkpoints and restartpoints
stats_resettimestamp with time zoneTime at which these statistics were last reset
Create system view pg_stat_checkpointer (Bharath Rupireddy, Anton A. Melnikov, Alexander Korotkov)
Relevant columns have been removed from pg_stat_bgwriter and added to this new system view.
https://www.postgresql.org/docs/17/monitoring-stats.html#MONITORING-PG-STAT-CHECKPOINTER-VIEW
27.2.14.
pg_stat_bgwriter
The
pg_stat_bgwriter
view will always have a single row, containing data about the background writer of the cluster.Table 27.24.
pg_stat_bgwriter
Viewbuffers_clean
bigint
Number of buffers written by the background writermaxwritten_clean
bigint
Number of times the background writer stopped a cleaning scan because it had written too many buffersbuffers_alloc
bigint
Number of buffers allocatedstats_reset
timestamp with time zone
Time at which these statistics were last reset27.2.15.
pg_stat_checkpointer
The
pg_stat_checkpointer
view will always have a single row, containing data about the checkpointer process of the cluster.Table 27.25.
pg_stat_checkpointer
Viewnum_timed
bigint
Number of scheduled checkpoints that have been performednum_requested
bigint
Number of requested checkpoints that have been performedrestartpoints_timed
bigint
Number of scheduled restartpoints due to timeout or after a failed attempt to perform itrestartpoints_req
bigint
Number of requested restartpointsrestartpoints_done
bigint
Number of restartpoints that have been performedwrite_time
double precision
Total amount of time that has been spent in the portion of processing checkpoints and restartpoints where files are written to disk, in millisecondssync_time
double precision
Total amount of time that has been spent in the portion of processing checkpoints and restartpoints where files are synchronized to disk, in millisecondsbuffers_written
bigint
Number of buffers written during checkpoints and restartpointsstats_reset
timestamp with time zone
Time at which these statistics were last reset