A PostgreSQL logical replication slot is a retention obligation
A PostgreSQL logical replication slot represents a stream of changes that a consumer can replay in order. The slot also acts as a retention promise. While it exists, PostgreSQL keeps the WAL needed by its consumer. An abandoned slot can therefore turn a small replication mistake into a disk-capacity incident, a failed backup, or an outage that affects every database in the cluster.
Slots have an identifier that is unique across the cluster. Creating and dropping them is not ordinary application work. PostgreSQL restricts replication-slot functions to superusers and users with the REPLICATION privilege. That is an administrative boundary, not a reason to give every integration the same role.…