Replication status
pg_replicationCheck PostgreSQL replication health: see primary/standby roles, lag, retained WAL slots, publications, subscriptions, conflicts, and settings to diagnose stalled replicas or disk-filling slots.
Instructions
Show the replication state of the server in one answer: whether it is a primary or a standby, connected standbys with lag, replication slots and the WAL they retain, the WAL receiver and replay delay on a standby, publications with their tables, subscriptions with their statistics, recovery conflicts and the settings that govern replication.
Use it to check that replicas are healthy, to find an abandoned slot that makes the disk fill with WAL, or to see what logical replication publishes. Connection strings and passwords are never shown. A server without any replication says so plainly.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "pg_replication"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| connection | No |