# Account for publisher slots when retiring a PostgreSQL subscription

> Keep publisher-slot cleanup owned and visible when a retired subscriber cannot reach its source.

- Canonical URL: https://update.dsesecurity.com/updates/account-for-publisher-slots-when-retiring-a-postgresql-subscription/
- Publisher: Detection Systems & Engineering (DSE Security)
- Author: DSE Security Editorial Team
- Published: 2026-10-15T13:32:34+00:00
- Modified: 2026-10-15T13:36:15+00:00
- Last reviewed by DSE: 2026-10-15
- Resource type: Guide
- DSE priority: Information
- Topics: Business Continuity, IT
- Reading time: 2 minutes

## What you need to know

Keep publisher-slot cleanup owned and visible when a retired subscriber cannot reach its source.

## Potentially affected

This applies to PostgreSQL 17 logical-subscription retirement or migration. It concerns ownership of leftover publisher resources, not permission to remove an arbitrary replication slot.

## DSE recommendation

DSE recommends capturing the subscription-to-slot mapping before decommissioning either side.

## Article

Keep publisher-slot cleanup owned and visible when a retired subscriber cannot reach its source.

## Source facts

PostgreSQL 17 normally creates a publisher replication slot with a subscription and removes it when the subscription is dropped. The subscription and slot can also be managed separately. If the publisher is unreachable, retiring the local subscription may require disassociating its slot first. Slots left on a publisher that still exists continue reserving WAL, including any remaining table-synchronization slots, and can eventually fill its disk. Local subscription removal does not prove remote cleanup.

Source: [PostgreSQL 17 — Subscription](https://www.postgresql.org/docs/17/logical-replication-subscription.html).

## Applicability

This applies to PostgreSQL 17 logical-subscription retirement or migration. It concerns ownership of leftover publisher resources, not permission to remove an arbitrary replication slot.

## DSE recommendation

DSE recommends capturing the subscription-to-slot mapping before decommissioning either side. If a remote server is unavailable, create a tracked follow-up for an administrator to verify its final state when access returns. Require confirmation that no surviving subscriber depends on a slot before approving removal. Keep the publisher’s retained-WAL monitoring active until cleanup is evidenced. A local administrative success message should not close a retirement task that still has a live remote dependency.

## Verification

Rehearse removal with a disposable publisher and subscriber, including an unreachable-publisher case. Compare the recorded slot inventory before and after cleanup. Verify the intended subscriber is retired, unrelated slots remain, and the publisher is no longer retaining WAL on behalf of the removed relationship.

## Official reference

[PostgreSQL 17 — Subscription](https://www.postgresql.org/docs/17/logical-replication-subscription.html). Reviewed October 15, 2026.

## Primary reference

- Name: PostgreSQL 17 — Subscription
- Authority: www.postgresql.org
- URL: https://www.postgresql.org/docs/17/logical-replication-subscription.html
- Source publication date: Not stated by the source

## Citation and use

Preferred citation: “Account for publisher slots when retiring a PostgreSQL subscription,” DSE Security, https://update.dsesecurity.com/updates/account-for-publisher-slots-when-retiring-a-postgresql-subscription/
Publishing principles: https://update.dsesecurity.com/updates/dse-updates-editorial-methodology/
Usage and citation policy: https://update.dsesecurity.com/usage/
Copyright © 2026 Detection Systems & Engineering. All rights reserved.
