assess_slot_risk
Identify which replication slot is closest to invalidation by sampling WAL generation rate and comparing to retention settings. Estimate time until disk fills if disk space is provided.
Instructions
Project which slot is closest to invalidation, and how soon.
Judgment tool. Samples the current WAL generation rate (reads pg_current_wal_lsn() twice, sample_interval_seconds apart), reads max_slot_wal_keep_size, and projects a rough time-to-invalidation per slot. Pass available_disk_bytes to also get a time-to-disk-fill estimate. Run this on the PUBLISHER.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| available_disk_bytes | No | ||
| sample_interval_seconds | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||