Skip to main content
Version: 2.x

pg_stat_database_conflicts

The pg_stat_database_conflicts view provides statistics about query cancellations due to recovery conflicts on standby servers in PostgreSQL. Each row corresponds to a database and includes counts of cancellations caused by various conflict types, such as dropped tablespaces, lock timeouts, old snapshots, pinned buffers, and deadlocks. This view is useful for monitoring and diagnosing issues related to replication conflicts on standby servers.

columntypereferencesdescription
datidoidOID of a database.
datnamenameName of this database.
confl_tablespacebigintNumber of queries in this database that have been canceled due to dropped tablespaces.
confl_lockbigintNumber of queries in this database that have been canceled due to lock timeouts.
confl_snapshotbigintNumber of queries in this database that have been canceled due to old snapshots.
confl_bufferpinbigintNumber of queries in this database that have been canceled due to pinned buffers.
confl_deadlockbigintNumber of queries in this database that have been canceled due to deadlocks.