In this article
Reconcile restart position, WAL availability and invalidation reason before choosing resume, retention changes or a new replication baseline.
The consumer reconnects but cannot continue
A replication consumer is offline during maintenance. The slot remains visible, so the team expects reconnection to resume from its previous position. Visibility alone does not establish that the required WAL is still available or that the slot remains usable.
The slot-state reference separates activity from WAL availability. An inactive slot can still retain files and create storage pressure. A lost or invalidated slot represents a different recovery problem, even when both cases look like an absent consumer on the application dashboard.
Establish the continuity requirement
Record slot type, restart position, active state and consumer identity. Logical and physical slots expose different relevant fields; do not interpret a field that is inapplicable to the slot type as evidence of progress.
Tie the consumer’s durable recovery position to the actual slot. A recreated slot with a familiar name is not proof that the original decoding or replication history remains continuous. Recovery requires an agreed baseline and a compatible continuation point, not just successful authentication.
Interpret WAL status precisely
The reference distinguishes reserved and extended files that remain retained from unreserved files whose continued retention is no longer assured. Unreserved can return to a retained state; it is not identical to lost, which indicates an unusable slot.
Also inspect invalidation reason. The documented possibilities include removed WAL and other causes, with type-specific applicability. An idle timeout is not the same event as a downstream application reporting malformed data. Preserve the actual reason instead of assigning every failure to lag.
Read capacity headroom without guessing
The replication configuration reference explains checkpoint-time retention controls. A finite slot retention limit can permit required WAL removal when the consumer falls behind. Unlimited retention changes that risk into potentially unbounded storage demand; it is not a universal recovery fix.
The slot view’s safe_wal_size can help interpret remaining WAL headroom, but its null value has documented alternative meanings. Do not turn null into a numeric zero or an unconditional healthy state. Read it with the slot’s status and configured limit.
Choose a recovery path with evidence
For a still-usable slot, reconcile the consumer’s restart requirements before resuming. For an unusable slot, establish a supported new baseline and account for downstream reconciliation. Reconnecting repeatedly or creating a replacement slot cannot manufacture missing history.
Shared PostgreSQL resources explains why retained WAL matters to the wider service. Operation reconciliation helps frame duplicate or ambiguous downstream effects when continuity cannot simply be resumed.
Acceptance spans upstream and downstream
In an isolated exercise, pause a consumer and observe retained-state progression under a bounded retention policy. Verify the distinction between temporary inactivity and an actual unusable slot, without intentionally exhausting production storage. Acceptance records the slot state, continuity decision, restored consumer progress and downstream reconciliation. A green connection indicator alone does not prove that no change was skipped or repeated.
Earn rental income from GPUs
Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.