Skip to content
Release: Australia · Updated: 2026-03-12 · Official documentation · View source

PostgreSQL metrics

The following tables list and describe the metrics that are gathered as output from the specified PostgreSQL checks. Entries indicated as Featured metrics are high-visibility metrics that are displayed in the Operator Workspace Metric tab after an alert is generated. These metrics provide the operator with additional information to help them further explore the specified issue.

MetricDescription
pgsql.connections.active\(Featured metric\)Provides metrics on the total active connections in the PostgreSQL database.
pgsql.connections.idle\(Featured metric\)Provides metrics on the total idle connections on the PostgreSQL database.
MetricDescription
pgsql.db.size\(Featured metric\)Provides metrics on the total disk size utilization for each of the PostgreSQL databases on the server.
MetricDescription
pgsql.locks.AccessShareLockProvides metrics on read-lock mode acquired automatically from queried tables.
pgsql.locks.ExclusiveLockProvides metrics on read-lock mode acquired by LOCK TABLE table for IN EXCLUSIVE MODE statements.
MetricDescription
pgsql.tables\_size\(Featured metric\)Provides metrics on the database table size on the server.
MetricDescription
pgsql.statsbgwriter.buffers\_allocProvides metrics related to the number of allocated buffers.
pgsql.statsbgwriter.buffers\_backendProvides metrics related to the number of buffers written directly by a backend.
pgsql.statsbgwriter.buffers\_backend\_fsyncProvides metrics related to the number of times a backend had to execute its own fsync call \(normally the background writer handles those, even when the backend performs its own write\).
pgsql.statsbgwriter.buffers\_checkpointProvides metrics related to the number of buffers written during checkpoints.
pgsql.statsbgwriter.buffers\_cleanProvides metrics related to the number of buffers written by the background writer.
pgsql.statsbgwriter.checkpoint\_sync\_timeProvides metrics related to the total amount of time spent in the portion of checkpoint processing where files are synchronized to disk, in milliseconds.
pgsql.statsbgwriter.checkpoint\_write\_timeProvides metrics related to the total amount of time spent in the portion of checkpoint processing where files are written to disk, in milliseconds.
pgsql.statsbgwriter.checkpoints\_req\(Featured metric\)Provides metrics related to the number of requested checkpoints that have been performed.
pgsql.statsbgwriter.checkpoints\_timed\(Featured metric\)Provides metrics related to the number of scheduled checkpoints that have been performed.
pgsql.statsbgwriter.maxwritten\_cleanProvides metrics related to the number of times the background writer stopped a cleaning scan because it had written too many buffers.
MetricDescription
pgsql.statsdb.blk\_read\_time\(Featured metric\)Provides metrics related to the time spent reading data file blocks by backends in this database, in milliseconds.
pgsql.statsdb.blk\_write\_time\(Featured metric\)Provides metrics related to the time spent writing data file blocks by backends in this database, in milliseconds.
pgsql.statsdb.blks\_hit\(Featured metric\)Provides metrics related to the number of times disk blocks were found in the buffer cache, so that a read was not necessary. This only includes hits in the PostgreSQL buffer cache, not the operating system's file system cache.
pgsql.statsdb.blks\_readProvides metrics related to the number of disk blocks read in this database.
pgsql.statsdb.checksum\_failuresProvides metrics related to the number of data page checksum failures detected in this database \(or on a shared object\), or 0 if data checksums are not enabled.
pgsql.statsdb.conflictsProvides metrics related to the number of queries canceled due to conflicts with recovery in this database. Conflicts occur only on standby servers.
pgsql.statsdb.deadlocks\(Featured metric\)Provides metrics related to the number of deadlocks detected in this database.
pgsql.statsdb.numbackendsProvides metrics related to the number of backends currently connected to this database. This is the only column in this view that returns a value reflecting the current state; all other columns return the accumulated values since the last reset.
pgsql.statsdb.temp\_bytesProvides metrics related to the total amount of data written to temporary files by queries in this database. All temporary files are counted, regardless of why the temporary file was created, and regardless of the log_temp_files setting.
pgsql.statsdb.temp\_filesProvides metrics related to the number of temporary files created by queries in this database. All temporary files are counted, regardless of why the temporary file was created (such as sorting or hashing), and regardless of the log_temp_files setting.
pgsql.statsdb.tup\_deletedProvides metrics related to the number of rows deleted by queries in this database.
pgsql.statsdb.tup\_fetchedProvides metrics related to the number of rows fetched by queries in this database.
pgsql.statsdb.tup\_insertedProvides metrics related to the number of rows inserted by queries in this database.
pgsql.statsdb.tup\_returnedProvides metrics related to the number of rows returned by queries in this database.
pgsql.statsdb.tup\_updatedProvides metrics related to the number of rows updated by queries in this database.
pgsql.statsdb.xact\_commitProvides metrics related to the number of transactions in this database that have been committed.
pgsql.statsdb.xact\_rollbackProvides metrics related to the number of transactions in this database that have been rolled back.
MetricDescription
pgsql.statsio.heap\_blks\_hit\(Featured metric\)Provides metrics related to the number of buffer hits in this table.
pgsql.statsio.heap\_blks\_readProvides metrics related to the number of disk blocks read from this table.
pgsql.statsio.idx\_blks\_hitProvides metrics related to the number of buffer hits in all indexes in this table.
pgsql.statsio.idx\_blks\_readProvides metrics related to the number of disk blocks read from all indexes in this table.
pgsql.statsio.tidx\_blks\_hitProvides metrics related to the number of buffer hits in this table's TOAST table index \(if any\).
pgsql.statsio.tidx\_blks\_readProvides metrics related to the number of disk blocks read from this table's TOAST table index.
pgsql.statsio.toast\_blks\_hitProvides metrics related to the number of buffer hits in this table's TOAST table \(if any\).
pgsql.statsio.toast\_blks\_readProvides metrics related to the number of disk blocks read from this table's TOAST table \(if any\).
MetricDescription
pgsql.statstable.idx_scanProvides metrics related to the number of index scans initiated on this table.
pgsql.statstable.idx_tup_fetchProvides metrics related to the number of live rows fetched by index scans.
pgsql.statstable.n_dead_tupProvides metrics related to the estimated number of dead rows.
pgsql.statstable.n_live_tupProvides metrics related to the estimated number of live rows.
pgsql.statstable.n_tup_delProvides metrics related to the number of deleted rows.
pgsql.statstable.n_tup_hot_updProvides metrics related to the number of rows HOT updated (that is, with no separate index update required).
pgsql.statstable.n_tup_insProvides metrics related to the number of inserted rows.
pgsql.statstable.n_tup_updProvides metrics related to the number of updated rows.
pgsql.statstable.seq_scanProvides metrics related to the number of sequential scans initiated on this table.
pgsql.statstable.seq_tup_readProvides metrics related to the number of live rows fetched by sequential scans.

Parent Topic:Agent Client Collector Monitoring default checks and policies