PostgreSQL metrics

  • 릴리스 버전: Australia
  • 업데이트 날짜 2026년 03월 12일
  • 소요 시간: 13분
  • 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.

    표 1. postgresql.check-connections metrics
    Metric Description
    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.
    표 2. postgresql.metric-dbsize metrics
    Metric Description
    pgsql.db.size

    (Featured metric)

    Provides metrics on the total disk size utilization for each of the PostgreSQL databases on the server.
    표 3. postgresql.metric-locks metrics
    Metric Description
    pgsql.locks.AccessShareLock Provides metrics on read-lock mode acquired automatically from queried tables.
    pgsql.locks.ExclusiveLock Provides metrics on read-lock mode acquired by LOCK TABLE table for IN EXCLUSIVE MODE statements.
    표 4. postgresql.metric-relation-size metrics
    Metric Description
    pgsql.tables_size

    (Featured metric)

    Provides metrics on the database table size on the server.
    표 5. postgresql.metric-statsbgwriter metrics
    Metric Description
    pgsql.statsbgwriter.buffers_alloc Provides metrics related to the number of allocated buffers.
    pgsql.statsbgwriter.buffers_backend Provides metrics related to the number of buffers written directly by a backend.
    pgsql.statsbgwriter.buffers_backend_fsync Provides 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_checkpoint Provides metrics related to the number of buffers written during checkpoints.
    pgsql.statsbgwriter.buffers_clean Provides metrics related to the number of buffers written by the background writer.
    pgsql.statsbgwriter.checkpoint_sync_time Provides 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_time Provides 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_clean Provides metrics related to the number of times the background writer stopped a cleaning scan because it had written too many buffers.
    표 6. postgresql.metric-statsdb metrics
    Metric Description
    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_read Provides metrics related to the number of disk blocks read in this database.
    pgsql.statsdb.checksum_failures Provides 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.conflicts Provides 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.numbackends Provides 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_bytes Provides 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_files Provides 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_deleted Provides metrics related to the number of rows deleted by queries in this database.
    pgsql.statsdb.tup_fetched Provides metrics related to the number of rows fetched by queries in this database.
    pgsql.statsdb.tup_inserted Provides metrics related to the number of rows inserted by queries in this database.
    pgsql.statsdb.tup_returned Provides metrics related to the number of rows returned by queries in this database.
    pgsql.statsdb.tup_updated Provides metrics related to the number of rows updated by queries in this database.
    pgsql.statsdb.xact_commit Provides metrics related to the number of transactions in this database that have been committed.
    pgsql.statsdb.xact_rollback Provides metrics related to the number of transactions in this database that have been rolled back.
    표 7. postgresql.metric-statsio metrics
    Metric Description
    pgsql.statsio.heap_blks_hit

    (Featured metric)

    Provides metrics related to the number of buffer hits in this table.
    pgsql.statsio.heap_blks_read Provides metrics related to the number of disk blocks read from this table.
    pgsql.statsio.idx_blks_hit Provides metrics related to the number of buffer hits in all indexes in this table.
    pgsql.statsio.idx_blks_read Provides metrics related to the number of disk blocks read from all indexes in this table.
    pgsql.statsio.tidx_blks_hit Provides metrics related to the number of buffer hits in this table's TOAST table index (if any).
    pgsql.statsio.tidx_blks_read Provides metrics related to the number of disk blocks read from this table's TOAST table index.
    pgsql.statsio.toast_blks_hit Provides metrics related to the number of buffer hits in this table's TOAST table (if any).
    pgsql.statsio.toast_blks_read Provides metrics related to the number of disk blocks read from this table's TOAST table (if any).
    표 8. postgresql.metric-statsio metrics
    Metric Description
    pgsql.statstable.idx_scan Provides metrics related to the number of index scans initiated on this table.
    pgsql.statstable.idx_tup_fetch Provides metrics related to the number of live rows fetched by index scans.
    pgsql.statstable.n_dead_tup Provides metrics related to the estimated number of dead rows.
    pgsql.statstable.n_live_tup Provides metrics related to the estimated number of live rows.
    pgsql.statstable.n_tup_del Provides metrics related to the number of deleted rows.
    pgsql.statstable.n_tup_hot_upd Provides metrics related to the number of rows HOT updated (that is, with no separate index update required).
    pgsql.statstable.n_tup_ins Provides metrics related to the number of inserted rows.
    pgsql.statstable.n_tup_upd Provides metrics related to the number of updated rows.
    pgsql.statstable.seq_scan Provides metrics related to the number of sequential scans initiated on this table.
    pgsql.statstable.seq_tup_read Provides metrics related to the number of live rows fetched by sequential scans.