Live Ops
Live Ops is the on-call tab: what's happening in the database right now. Active sessions, lock graph, replication slots, slow queries in real time.
Open
⌘+Shift+L opens a separate tab.
Inside — three sub-tabs: Sessions, Slow Queries, Replication.
Sessions
A list of active sessions (pg_stat_activity):
| Field |
Meaning |
| PID |
Process on the server |
| User |
Connection user |
| Database |
Which DB |
| State |
active, idle, idle in transaction, idle in transaction (aborted) |
| Query |
Current or last query (truncated to 200 chars; full in the detail modal) |
| Duration |
How long it's been running |
| Wait Event |
If active and waiting — what for (Lock:transactionid, IO:DataFileRead, etc.) |
| Client addr |
From where |
Lock graph
A Graph button in the Sessions sub-header switches the table view to a graph. Each node is a session, edges show who blocks whom.
Edge color = lock mode:
- 🟢 AccessShareLock — light (SELECT)
- 🟡 RowExclusiveLock — INSERT/UPDATE/DELETE
- 🔴 AccessExclusiveLock — DDL, VACUUM FULL
A legend lives in the bottom corner. Hover an edge — tooltip shows full lock name and the table.
Actions on a session
Right-click a node / row:
- Show full query — modal with full SQL
- Copy PID — for use in
psql
- pg_terminate_backend(PID) — kill the session. On prod, requires PID confirmation.
- pg_cancel_backend(PID) — soft cancel (current query only, session stays)
Don't kill your backend's sessions blindly. Use pg_cancel_backend first — it just cancels the query. pg_terminate_backend drops the connection, and your app sees an error.
Slow Queries
If pg_stat_statements is installed — top queries by total_exec_time. Refreshes on ⌘+R or every N seconds (see below).
If the extension isn't installed — instructions for enabling it appear.
Replication
A table from pg_stat_replication:
| Field |
Meaning |
| Application |
Replica name |
| Client |
Replica IP |
| State |
streaming, catchup, backup |
| Sent LSN / Write LSN / Flush LSN / Replay LSN |
Where the replica is in WAL |
| Lag (bytes) |
How many WAL bytes haven't been delivered yet |
| Lag (time) |
How many seconds behind |
| Sync state |
sync, async, quorum |
If lag > threshold (default 10 seconds), the row is red.
Replication slots
A second table below the main one — pg_replication_slots. Useful for spotting inactive slots that hold WAL and fill the disk:
| Slot |
Active |
Restart LSN |
WAL retained |
node1 |
✓ |
0/12345678 |
4 MB |
old_subscriber |
— |
0/A0000000 |
12 GB ⚠ |
Right-click → Drop slot… removes an inactive slot (with confirmation).
Auto-refresh
In the tab header — an Auto-refresh toggle: off / 5s / 10s / 30s. For on-call, 5s with the tab kept open is convenient.
Live Ops load on the database is minimal — it's SELECTs on system views. Safe on prod.
Next