Wiki / Statistics & Metrics
Statistics & Metrics
Compare versionsIndividually addressable statistics and progress fields, definitions, units and reset context.
Reading PostgreSQL 18.6.
616 entries; 514 recorded in PostgreSQL 18.6.
-
pg_stat_checkpointer.slru_written pg_stat_checkpointer
Number of SLRU buffers written during checkpoints and restartpoints
-
pg_stat_checkpointer.stats_reset pg_stat_checkpointer
Time at which these statistics were last reset
-
pg_stat_checkpointer.sync_time pg_stat_checkpointer
Total amount of time that has been spent in the portion of processing checkpoints and restartpoints where files are synchronized to disk, in milliseconds
-
pg_stat_checkpointer.write_time pg_stat_checkpointer
Total amount of time that has been spent in the portion of processing checkpoints and restartpoints where files are written to disk, in milliseconds
-
pg_stat_database.active_time pg_stat_database
Time spent executing SQL statements in this database, in milliseconds (this corresponds to the states active and fastpath function call in pg_stat_activity)
-
pg_stat_database.blk_read_time pg_stat_database
Time spent reading data file blocks by backends in this database, in milliseconds (if track_io_timing is enabled, otherwise zero)
-
pg_stat_database.blk_write_time pg_stat_database
Time spent writing data file blocks by backends in this database, in milliseconds (if track_io_timing is enabled, otherwise zero)
-
pg_stat_database.blks_hit pg_stat_database
Number of times disk blocks were found already 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)
-
pg_stat_database.blks_read pg_stat_database
Number of disk blocks read in this database
-
pg_stat_database.checksum_failures pg_stat_database
Number of data page checksum failures detected in this database (or on a shared object), or NULL if data checksums are disabled.
-
pg_stat_database.checksum_last_failure pg_stat_database
Time at which the last data page checksum failure was detected in this database (or on a shared object), or NULL if data checksums are disabled.
-
pg_stat_database.conflicts pg_stat_database
Number of queries canceled due to conflicts with recovery in this database. (Conflicts occur only on standby servers; see pg_stat_database_conflicts for details.)
-
pg_stat_database.datid pg_stat_database
OID of this database, or 0 for objects belonging to a shared relation
-
pg_stat_database.datname pg_stat_database
Name of this database, or NULL for shared objects.
-
pg_stat_database.deadlocks pg_stat_database
Number of deadlocks detected in this database
-
pg_stat_database.idle_in_transaction_time pg_stat_database
Time spent idling while in a transaction in this database, in milliseconds (this corresponds to the states idle in transaction and idle in transaction (aborted) in pg_stat_activity)
-
pg_stat_database.numbackends pg_stat_database
Number of backends currently connected to this database, or NULL for shared objects. This is the only column in this view that returns a value reflecting current state; all other columns return the accumulated values since the last reset.
-
pg_stat_database.parallel_workers_launched pg_stat_database
Number of parallel workers launched by queries on this database
-
pg_stat_database.parallel_workers_to_launch pg_stat_database
Number of parallel workers planned to be launched by queries on this database
-
pg_stat_database.session_time pg_stat_database
Time spent by database sessions in this database, in milliseconds (note that statistics are only updated when the state of a session changes, so if sessions have been idle for a long time, this idle time won't be included)
-
pg_stat_database.sessions pg_stat_database
Total number of sessions established to this database
-
pg_stat_database.sessions_abandoned pg_stat_database
Number of database sessions to this database that were terminated because connection to the client was lost
-
pg_stat_database.sessions_fatal pg_stat_database
Number of database sessions to this database that were terminated by fatal errors
-
pg_stat_database.sessions_killed pg_stat_database
Number of database sessions to this database that were terminated by operator intervention
-
pg_stat_database.stats_reset pg_stat_database
Time at which these statistics were last reset
-
pg_stat_database.temp_bytes pg_stat_database
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.
-
pg_stat_database.temp_files pg_stat_database
Number of temporary files created by queries in this database. All temporary files are counted, regardless of why the temporary file was created (e.g., sorting or hashing), and regardless of the log_temp_files setting.
-
pg_stat_database.tup_deleted pg_stat_database
Number of rows deleted by queries in this database
-
pg_stat_database.tup_fetched pg_stat_database
Number of live rows fetched by index scans in this database
-
pg_stat_database.tup_inserted pg_stat_database
Number of rows inserted by queries in this database
-
pg_stat_database.tup_returned pg_stat_database
Number of live rows fetched by sequential scans and index entries returned by index scans in this database
-
pg_stat_database.tup_updated pg_stat_database
Number of rows updated by queries in this database
-
pg_stat_database.xact_commit pg_stat_database
Number of transactions in this database that have been committed
-
pg_stat_database.xact_rollback pg_stat_database
Number of transactions in this database that have been rolled back
-
pg_stat_database_conflicts.confl_active_logicalslot pg_stat_database_conflicts
Number of uses of logical slots in this database that have been canceled due to old snapshots or too low a wal_level on the primary
-
pg_stat_database_conflicts.confl_bufferpin pg_stat_database_conflicts
Number of queries in this database that have been canceled due to pinned buffers
-
pg_stat_database_conflicts.confl_deadlock pg_stat_database_conflicts
Number of queries in this database that have been canceled due to deadlocks
-
pg_stat_database_conflicts.confl_lock pg_stat_database_conflicts
Number of queries in this database that have been canceled due to lock timeouts
-
pg_stat_database_conflicts.confl_snapshot pg_stat_database_conflicts
Number of queries in this database that have been canceled due to old snapshots
-
pg_stat_database_conflicts.confl_tablespace pg_stat_database_conflicts
Number of queries in this database that have been canceled due to dropped tablespaces
-
pg_stat_database_conflicts.datid pg_stat_database_conflicts
OID of a database
-
pg_stat_database_conflicts.datname pg_stat_database_conflicts
Name of this database
-
Not recorded in the selected version.
-
pg_stat_gssapi.credentials_delegated pg_stat_gssapi
True if GSSAPI credentials were delegated on this connection.
-
pg_stat_gssapi.encrypted pg_stat_gssapi
True if GSSAPI encryption is in use on this connection
-
pg_stat_gssapi.gss_authenticated pg_stat_gssapi
True if GSSAPI authentication was used for this connection
-
pg_stat_gssapi.pid pg_stat_gssapi
Process ID of a backend
-
pg_stat_gssapi.principal pg_stat_gssapi
Principal used to authenticate this connection, or NULL if GSSAPI was not used to authenticate this connection. This field is truncated if the principal is longer than NAMEDATALEN (64 characters in a standard build).
-
pg_stat_io.backend_type pg_stat_io
Type of backend (e.g. background worker, autovacuum worker). See pg_stat_activity for more information on backend_types. Some backend_types do not accumulate I/O operation statistics and will not be included in the view.
-
pg_stat_io.context pg_stat_io
The context of an I/O operation. Possible values are: normal: The default or standard context for a type of I/O operation. For example, by default, relation data is read into and written out from shared buffers. Thus, reads and writes of relation d…
-
pg_stat_io.evictions pg_stat_io
Number of times a block has been written out from a shared or local buffer in order to make it available for another use. In context normal, this counts the number of times a block was evicted from a buffer and replaced with another block. In conte…
-
pg_stat_io.extend_bytes pg_stat_io
The total size of relation extend operations in bytes.
-
pg_stat_io.extend_time pg_stat_io
Time spent waiting for extend operations in milliseconds. (if track_io_timing is enabled and object is not wal, or if track_wal_io_timing is enabled and object is wal, otherwise zero)
-
pg_stat_io.extends pg_stat_io
Number of relation extend operations.
-
pg_stat_io.fsync_time pg_stat_io
Time spent waiting for fsync operations in milliseconds (if track_io_timing is enabled and object is not wal, or if track_wal_io_timing is enabled and object is wal, otherwise zero)
-
pg_stat_io.fsyncs pg_stat_io
Number of fsync calls. These are only tracked in context normal.
-
pg_stat_io.hits pg_stat_io
The number of times a desired block was found in a shared buffer.
-
pg_stat_io.object pg_stat_io
Target object of an I/O operation. Possible values are: relation: Permanent relations. temp relation: Temporary relations. wal: Write Ahead Logs.
-
Not recorded in the selected version.
-
pg_stat_io.read_bytes pg_stat_io
The total size of read operations in bytes.
-
pg_stat_io.read_time pg_stat_io
Time spent waiting for read operations in milliseconds (if track_io_timing is enabled and object is not wal, or if track_wal_io_timing is enabled and object is wal, otherwise zero)
-
pg_stat_io.reads pg_stat_io
Number of read operations.
-
pg_stat_io.reuses pg_stat_io
The number of times an existing buffer in a size-limited ring buffer outside of shared buffers was reused as part of an I/O operation in the bulkread, bulkwrite, or vacuum contexts.
-
pg_stat_io.stats_reset pg_stat_io
Time at which these statistics were last reset.
-
pg_stat_io.write_bytes pg_stat_io
The total size of write operations in bytes.
-
pg_stat_io.write_time pg_stat_io
Time spent waiting for write operations in milliseconds (if track_io_timing is enabled and object is not wal, or if track_wal_io_timing is enabled and object is wal, otherwise zero)
-
pg_stat_io.writeback_time pg_stat_io
Time spent waiting for writeback operations in milliseconds (if track_io_timing is enabled, otherwise zero). This includes the time spent queueing write-out requests and, potentially, the time spent to write out the dirty data.
-
pg_stat_io.writebacks pg_stat_io
Number of units of size BLCKSZ (typically 8kB) which the process requested the kernel write out to permanent storage.
-
pg_stat_io.writes pg_stat_io
Number of write operations.
-
Not recorded in the selected version.
-
Not recorded in the selected version.
-
Not recorded in the selected version.
-
Not recorded in the selected version.
-
Not recorded in the selected version.
-
Not recorded in the selected version.
-
Not recorded in the selected version.
-
Not recorded in the selected version.
-
Not recorded in the selected version.
-
Not recorded in the selected version.
-
Not recorded in the selected version.
-
Not recorded in the selected version.
-
pg_stat_progress_analyze.child_tables_done pg_stat_progress_analyze
Number of child tables scanned. This counter only advances when the phase is acquiring inherited sample rows.
-
pg_stat_progress_analyze.child_tables_total pg_stat_progress_analyze
Number of child tables.
-
pg_stat_progress_analyze.current_child_table_relid pg_stat_progress_analyze
OID of the child table currently being scanned. This field is only valid when the phase is acquiring inherited sample rows.
-
pg_stat_progress_analyze.datid pg_stat_progress_analyze
OID of the database to which this backend is connected.
-
pg_stat_progress_analyze.datname pg_stat_progress_analyze
Name of the database to which this backend is connected.
-
pg_stat_progress_analyze.delay_time pg_stat_progress_analyze
Total time spent sleeping due to cost-based delay (see Section 19.10.2), in milliseconds (if track_cost_delay_timing is enabled, otherwise zero).
-
pg_stat_progress_analyze.ext_stats_computed pg_stat_progress_analyze
Number of extended statistics computed. This counter only advances when the phase is computing extended statistics.
-
pg_stat_progress_analyze.ext_stats_total pg_stat_progress_analyze
Number of extended statistics.
-
pg_stat_progress_analyze.phase pg_stat_progress_analyze
Current processing phase. See Table 27.39.
-
pg_stat_progress_analyze.pid pg_stat_progress_analyze
Process ID of backend.
-
pg_stat_progress_analyze.relid pg_stat_progress_analyze
OID of the table being analyzed.
-
pg_stat_progress_analyze.sample_blks_scanned pg_stat_progress_analyze
Number of heap blocks scanned.
-
pg_stat_progress_analyze.sample_blks_total pg_stat_progress_analyze
Total number of heap blocks that will be sampled.
-
Not recorded in the selected version.
-
pg_stat_progress_basebackup.backup_streamed pg_stat_progress_basebackup
Amount of data streamed. This counter only advances when the phase is streaming database files or transferring wal files.
-
pg_stat_progress_basebackup.backup_total pg_stat_progress_basebackup
Total amount of data that will be streamed. This is estimated and reported as of the beginning of streaming database files phase. Note that this is only an approximation since the database may change during streaming database files phase and WAL log…
-
Not recorded in the selected version.
-
pg_stat_progress_basebackup.phase pg_stat_progress_basebackup
Current processing phase. See Table 27.48.
-
pg_stat_progress_basebackup.pid pg_stat_progress_basebackup
Process ID of a WAL sender process.
RecordedFirst recordedInterface or attribute changeNo longer recorded
Squares indicate presence in sampled builds, not first introduction. Select a square for the same-version definition and sources.
Changes in PostgreSQL 18.6 · Export JSON
Reading this collection
Each field retains its view and source context. Units, collection and reset behavior are recorded only where supported by evidence. Example queries do not assert measured values, and current-state fields must not be treated as cumulative counters.