Help Database Monitoring PostgreSQL Server Monitoring PostgreSQL Server Performance Metrics

PostgreSQL server performance metrics

Gain deeper visibility into the key performance metrics of your PostgreSQL server—including connections, cache hit ratios, rows fetched/returned, deadlocks, transactions, write-ahead logging (WAL) metrics, and locks—all from a single, comprehensive console.

The Site24x7 server monitoring agent will send you instant alerts whenever there is a breach in any pre-defined threshold. You can also automate remediative actions and avoid outages proactively.

Supported metrics   

Metric name

Description

Unit

Overview

Databases

The number of databases currently present in the instance

Count

Version

The version of the PostgreSQL database

String

Uptime

The time since PostgreSQL started

Days, Hours, and Seconds

Connection Active

The number of connections currently executing queries

Count

Connection Idle

The number of connections currently waiting for a new client command

Count

Connections

The percentage of SQL connections connected to the postgres server

Percentage

Cache Hit Ratio

The percentage of blocks read from the cache in the entire instance.
Overall cache hit ratio = (Overall blocks hit/(Overall blocks hit + Overall blocks read)) * 100

Percentage

Backend Process

The overall backend processes connected to the instance

Count

Overall Rows Updated

The total number of rows updated in this instance

Count

Overall Rows Inserted

The total number of rows inserted in this instance

Count

Overall Rows Deleted

The total number of rows deleted in this instance

Count

Resource Utilization

Access Exclusive Lock

The number of current access exclusive locks. This mode guarantees that the holder is the only transaction accessing the table in any way.

Acquired by the DROP TABLE, TRUNCATE, REINDEX, CLUSTER, VACUUM FULL, and REFRESH MATERIALIZED VIEW (without CONCURRENTLY) commands. Many forms of ALTER INDEX and ALTER TABLE also acquire a lock at this level. This is also the default lock mode for LOCK TABLE statements that do not specify a mode explicitly.

Count

Row Exclusive Lock

The number of current row exclusive locks. The commands UPDATE, DELETE, INSERT, and MERGE acquire this lock mode on the target table

Count

Share Row Exclusive Lock

The number of current share row exclusive locks. This mode protects a table against concurrent data changes, and is self-exclusive so that only one session can hold it at a time. Acquired by CREATE TRIGGER and some forms of ALTER TABLE

Count

Share Update Exclusive Lock

The number of current share update exclusive locks. Acquired by VACUUM (without FULL), ANALYZE, CREATE INDEX CONCURRENTLY, CREATE STATISTICS, COMMENT ON, REINDEX CONCURRENTLY, and certain ALTER INDEX and ALTER TABLE variants

Count

Access Share Lock

The number of current access share locks. Any query that only reads a table and does not modify it will acquire this lock mode

Count

Exclusive Lock

The number of current exclusive locks. This mode allows only concurrent ACCESS SHARE locks, i.e., only reads from the table can proceed in parallel with a transaction holding this lock mode. Acquired by REFRESH MATERIALIZED VIEW CONCURRENTLY

Count

Row Share Lock

The number of current row share locks. The SELECT command acquires a lock of this mode on all tables on which one of the FOR UPDATE, FOR NO KEY UPDATE, FOR SHARE, or FOR KEY SHARE options is specified

Count

Share Lock

The number of current share locks. This mode protects a table against concurrent data changes. Acquired by CREATE INDEX

Count

Deadlocks

The number of deadlocks detected in the last five minutes in this instance

Count

Temp Files

The total number of temporary files created by queries in the last five minutes in this instance

Count

Temp Bytes

The total amount of data written to temporary files in the last five minutes in this instance

Bytes

Overall Blocks Read Time

The time spent reading data file blocks by backends (beyond PostgreSQL version 12, these metrics provide data only if track_io_timing is enabled, otherwise 0 will be displayed)

Milliseconds

Overall Blocks Write Time

The time spent writing data file blocks by backends (beyond PostgreSQL version 12, these metrics provide data only if track_io_timing is enabled, otherwise 0 will be displayed)

Milliseconds

Throughput

Rows Fetched / Returned

The overall percentage of rows fetched by rows returned.
Rows fetched by returned = (Rows fetched / Rows returned)*100

Percentage

Overall Transactions Committed

The total number of transactions in this instance that have been committed

Count

Overall Transactions Rollback

The total number of transactions in this instance that have been rolled back

Count

Overall Active Time

The total time spent executing SQL statements in this instance

Milliseconds

Overall Idle Time

The total time spent idling while in a transaction in this instance

Milliseconds

Auto Vacuum Work Utilization

The current usage of auto vacuum process running in the background. (Auto vacuum utilization = Number of processes / Auto vacuum workers max)

 

Percentage

Replication & Checkpoint

Replication Delay

This is only calculated in a standby instance. The delay in the WAL file transferred from primary to standby

Milliseconds

Conflicts

The number of queries canceled due to conflicts with recovery in this instance. (only in a standby instance)

Count

Buffers Checkpoint

The number of buffers written during checkpoints

Count

Buffers Clean

The number of buffers written by the background writer

Count

Buffers Backend

The number of buffers written by backends

Count

Checkpoints Requested

The total number of checkpoints requested

Count

Checkpoints Timed

The total number of checkpoints scheduled

Count

WAL Bytes

The total amount of WAL generated in bytes

Bytes

WAL Files

The number of WAL files in the WAL directory

Count

Archived Count

The number of WAL files that have been successfully archived

Count

Failed Count

The number of failed attempts for archiving WAL files

Count

Databases

Database Name

The name of the database

Text

Database Size

The size of the database

Bytes

No. of Backend Processes

The total number of backends currently connected to this database

Count

Temp Bytes

The total amount of data written to temporary files by queries in this database

Bytes

Cache Hit Ratio

The percentage of blocks read from the cache.
Cache hit ratio = (Blocks hit / (Blocks hit + Blocks read)) * 100

Percentage

Rows Inserted

The number of rows inserted by queries in this database

Count

Rows Deleted

The number of rows deleted by queries in this database

Count

Rows Updated

The number of rows updated by queries in this database

Count

Deadlocks

The number of deadlocks detected in this database

Count

Transactions Committed

The number of transactions in this database that have been committed

Count

Transactions Rollback

The number of transactions in this database that have been rolled back

Count

Related content

Database monitoring: MySQL | MSSQL | MySQL NDB Clusters
Server monitoring: Linux | Windows

Was this document helpful?
Thanks for taking the time to share your feedback. We’ll use your feedback to improve our online help resources.

Help Database Monitoring PostgreSQL Server Monitoring PostgreSQL Server Performance Metrics