decoding_stats
Identify replication slowness caused by large transactions spilling decode work to disk, using stats from pg_stat_replication_slots.
Instructions
Report logical-decoding spill/stream stats per slot.
Deterministic. Reads pg_stat_replication_slots for spill_txns / spill_bytes and streaming stats. Large spill_bytes means big transactions are spilling decode work to disk — an obscure but real cause of replication slowness (e.g. outbox batches that decode badly). Run this on the PUBLISHER.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |