Get logical replication status
get_logical_replication_statusCheck logical replication readiness: compare configured and effective wal_level, detect pending reloads, and report if on-demand wal_level flip is available.
Instructions
Report whether PG 19's on-demand wal_level flip is usable, plus the configured wal_level, the new PG 19 effective_wal_level preset GUC, and max_replication_slots. When configured and effective diverge the agent can tell that an ALTER SYSTEM has been done but a reload is still pending. Never raises. Returns an object with available (bool), server_version_num, server_version, wal_level, effective_wal_level, max_replication_slots, and detail.
Example: get_logical_replication_status()
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| database | No | Optional: target a configured secondary (read-only) database by name; omit for the primary. Call list_databases to see the configured ids. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| detail | Yes | ||
| available | Yes | ||
| wal_level | Yes | ||
| server_version | Yes | ||
| server_version_num | Yes | ||
| effective_wal_level | Yes | ||
| max_replication_slots | Yes |