Querious Docs

Server Status View — PostgreSQL

The Server Status view displays the PostgreSQL server's health and activity.

The PostgreSQL Server Status view
The PostgreSQL Server Status view

On the left side of the Server Status view is a summary of the status for the entire server. On the right side is a list of a few key per-database statistics.

Server Summary #

Server #

This section shows the version, start time, host and port, data directory, and whether the connection uses SSL.

Connections #

This section shows how many sessions are in different states, along with the Max Allowed number of connections (max_connections) so you can compare and see if the server is approaching that limit.

Statistic What it means
Active The connection is executing a query.
Idle The connection is connected and doing nothing.
Idle in Transaction

The connection is inside an open BEGIN but not running a query.

These hold locks until they finish, and high counts are a common cause of lock contention.

Total The total number of connections currently.
Max Allowed

The maximum number of connections (max_connections).

Getting close to it can prevent new connections.

Transactions #

These numbers are the totals since the statistics were last reset. They survive a clean server restart, but PostgreSQL resets them after a crash or other unclean shutdown.

Statistic What it means
Committed The number of transactions that finished successfully and made their changes permanent, across all databases.
Rolled Back

The number of transactions that were undone, either explicitly with ROLLBACK or because an error aborted them.

A high count relative to Committed can indicate application errors or dropped connections.

Deadlocks

The number of times two or more transactions were each waiting on a lock held by another, so PostgreSQL had to cancel one to break the cycle.

Any non-zero value is worth investigating.

Block Cache Hit

The percentage of block reads that were found in PostgreSQL's shared buffers rather than requested from the operating system, which may still have to read them from disk.

Below 95% may mean shared_buffers is too small.

Tuples #

This section shows the number of row-level operations across all databases, since the statistics were last reset. (A tuple is PostgreSQL's term for a row.)

Statistic What it means
Returned

The number of live rows read by sequential scans (every row examined, whether or not it matched), plus the index entries returned by index scans.

A value far larger than Fetched suggests queries are scanning many rows they don't need, which an index might fix.

Fetched The number of rows read from tables by index scans, rather than full table scans.
Inserted The number of rows added by queries, such as INSERT and COPY.
Updated The number of rows modified by queries, such as UPDATE.
Deleted The number of rows removed by queries, such as DELETE.

Checkpoints & Buffers #

This section shows how dirty buffers get written to disk.

A checkpoint is a periodic flush of all modified data in memory to disk. Checkpoints normally run on a timer (checkpoint_timeout), but PostgreSQL also starts one early when the write-ahead log fills up (max_wal_size), and a superuser (or a member of the pg_checkpoint role, PostgreSQL 15 and later) can request one manually with the CHECKPOINT command.

The background writer is a PostgreSQL process that quietly writes modified buffers to disk between checkpoints, so there are clean buffers available and queries rarely have to write pages themselves.

Statistic What it means
Checkpoints (Timed)

The number of checkpoints that were scheduled because checkpoint_timeout elapsed. This includes checkpoints that were skipped because the server had been idle.

This is the normal case.

Checkpoints (Requested)

The number of checkpoints that started early, either because the write-ahead log grew to max_wal_size, because one was requested manually, or because an operation such as a base backup required one.

A high ratio of requested to timed suggests max_wal_size is too low.

Write Time / Sync Time The total time checkpoints have spent writing modified buffers to the operating system, and the time spent forcing those writes out to disk.
Buffers at Checkpoint

The number of modified buffers written to disk by checkpoints.

A high number relative to Buffers Written (BG) can mean the background writer is leaving most of the writing to checkpoints.

Buffers Written (BG) The number of modified buffers the background writer wrote to disk proactively between checkpoints.
Buffers Allocated The number of times a buffer was claimed from the shared buffer pool to hold a block of data.

Per-Database Statistics #

On the right side of the Server Status view is a list of each (non-template) database, with a few key statistics.

Column What it shows
Size The amount of disk space used.
Cache Hit The percentage of block reads found in PostgreSQL's shared buffers since the last reset, rather than requested from the operating system.
Rollback The percentage of transactions rolled back. Elevated values can indicate application errors, conflicts, or dropped connections.
Deadlocks The number of deadlocks detected since the last reset.
Temp Files The number of temporary files created by queries, usually because a sort or hash exceeded work_mem. If that's the cause, reduce this by raising work_mem or adding an index.