inspect_subscriptions
Inspect PostgreSQL logical replication subscriptions to identify apply-lag signals by reviewing subscription metadata, worker state, and LSN positions.
Instructions
Inspect subscriptions and their apply-lag signals.
Deterministic. Joins pg_subscription with pg_stat_subscription for worker state, received/latest-end LSNs, and apply-lag signals (last_msg_send_time vs last_msg_receipt_time). The connection string (subconninfo) is deliberately omitted — it holds a password. Reading pg_subscription needs elevated privileges. Run this on the SUBSCRIBER.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |