View monitoring_database_conflicts

This view returns numbers of conflicts happend on standby servers, AKA followers. Therefore the qeury has to run against the followers.

The conflicts are shown per database.

Columns

Column Name datatype Description
database_id oid The OID of this database.
database_name name The name of this database.
conflicts_tablespace bigint The number of queries in this database that have been canceled due to dropped tablespaces.
conflicts_locks bigint The number of queries in this database that have been canceled due to lock timeouts.
conflichts_snapshot bigint The number of queries in this database that have been canceled due to old snapshots.
conflichts_pinned_buffers bigint The number of queries in this database that have been canceled due to pinned buffers.
conflicts_deadlocks bigint The number of queries in this database that have been canceled due to deadlocks.
conflicts_logical_replication_slots bigint The 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 server.

Example

SELECT *
FROM monitoring_wal;
database_id database_name conflicts_tablespace conflicts_locks conflichts_snapshot conflichts_pinned_buffers conflicts_deadlocks conflicts_logical_replication_slots
5 postgres 0 0 0 0 0 0
17490 stefanie 0 0 0 0 0 0
1 template1 0 0 0 0 0 0
4 template0 0 0 0 0 0 0
57636 something 0 0 0 0 0 0
103713 pgsql_tweaks_test 0 0 0 0 0 0