Hi,

The PostgreSQL 18 logical slot view exposes active and confirmed_flush_lsn
but a single sample does not tell an operator how long confirmed progress
has been unchanged. In a disposable PostgreSQL 18.6 instance, after a 2 s
idle timeout and a checkpoint, an inactive control slot was invalidated
with idle_timeout. The connected slot stayed active and valid, with the
same confirmed_flush_lsn and catalog_xmin in both samples. This matches the
documented timeout semantics. The run did not measure catalog growth or
diagnose a fault in the receiver.

Would a per-slot timestamp for the last advance of confirmed_flush_lsn be
useful as a monitoring signal? The consumer would still compare it with
lag and its workload. The design question is whether a volatile or
best-effort statistic is enough, including how to represent restart and
slot recreation, without a new durable write on each acknowledgement.

I would keep any invalidation policy out of this change.

https://www.postgresql.org/docs/18/runtime-config-replication.html#GUC-IDLE-REPLICATION-SLOT-TIMEOUT
https://www.postgresql.org/docs/18/view-pg-replication-slots.html

Local validation was on PostgreSQL 18.6. Source review and drafting were
assisted by Codex.

Thanks,
Artur Onysko


Reply via email to