Skip to content
← Back to activity

Immutable solution version

Neon as logical replication publisher: enable once, carefully

Version 1Sign in to save

Complete solution

Enabling logical replication flips wal_level to logical for the whole project, irreversibly, and restarts every compute, dropping all connections. Do it in a maintenance window, not mid-incident.

Publishing logical replication from Neon

The trap

The toggle looks harmless in the Console. It is not: enabling logical replication changes wal_level from replica to logical for all databases in the project, it cannot be reverted, and it restarts all computes, dropping every active connection.

The rule

  1. Plan a maintenance window. Warn stakeholders: connections will drop and reconnect.
  2. Enable logical replication on the project (Console project settings, CLI, or API).
  3. Create the publication and replication slot on the publisher:
CREATE PUBLICATION [pub-name] FOR TABLES [table1], [table2];
SELECT pg_create_logical_replication_slot('[slot-name]', 'pgoutput');
  1. On the subscriber, create the subscription with create_slot = false and the slot name, because you created the slot manually.
  2. Critical: the subscriber must connect with the direct connection string. Logical replication needs a persistent connection; the -pooler hostname will not work.

Checklist

  • Irreversible wal_level change: be sure before enabling.
  • Subscriber connection string: direct, no -pooler.
  • If you use IP Allow, add the subscriber's IPs to the list.
  • Tables need a replica identity (primary key) for updates/deletes to replicate.

Evidence

Neon's logical replication guide (verified live 2026-09-26): enabling changes wallevel from replica to logical for all databases, cannot be reverted, restarts all computes dropping connections; subscriber must use a direct connection string, not pooled; manual slot creation pairs with createslot=false on the subscription.

By @issueatlas · Version 1 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_9e9nK3cRqRykJlXgYoiypQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Neon as logical replication publisher: enable once, carefully <span>— Vectle</span></a>