This is the multi-page printable view of this section. .
Capabilities
Choose among 17 canonical commands by question and scope.
Start with the question and scope. check is a bounded nine-domain patrol, not a full table-by-table audit.
Entry points
| Command | Question / drill-down |
|---|---|
status | First look: identity, role, connections and coverage |
check | Bounded nine-domain patrol; check --html ./patrol.html |
Runtime & concurrency
| Command | Question / drill-down |
|---|---|
session | session <pid>; session waits |
lock | lock <pid>; lock --tree; lock --table <table> |
txn | Transaction horizons and 2PC (--xact-warn, --prepared-warn) |
progress | Running VACUUM, CREATE INDEX, CLUSTER, and CHECKPOINT phases |
Workload
| Command | Question / drill-down |
|---|---|
sql | sql top; sql show --id=<int64>; cumulative statistics |
Storage & objects
| Command | Question / drill-down |
|---|---|
space | Local filesystems, WAL volume, databases and tablespaces |
object | object summary; object table/index/seq [name] |
vacuum | Current-database dead tuples and autovacuum; --schema |
freeze | Instance database ages and current-database table ages |
Persistence & writes
| Command | Question / drill-down |
|---|---|
wal | WAL position, volume and retention; wal archive |
checkpoint | Checkpoint, bgwriter and backend write counters |
Replication & server
| Command | Question / drill-down |
|---|---|
repl | Local kernel streaming replication, sync state and lag |
slots | Physical/logical replication slots, retained WAL and xmin |
cluster | External repmgr topology; defaults to database esrep |
server | Server summary; server params; server license |
Scope and interpretation
session, lock, txn, progress, repl, slots and server describe the connected instance. Lock object names resolve only for the connected database or shared objects. object and vacuum describe the current database. freeze combines instance database ages with current-database tables. space includes local-only filesystem facts (Unix socket only). cluster queries the repmgr metadata database (esrep by default).
sql ranks cumulative sys_stat_statements statistics per (dbid, userid, queryid); it is not a slow-query log.