Stream row changes to external data platforms
Change data capture
Neon · Const
Neon logical replication enables PostgreSQL’s publisher-subscriber change streaming for a project. It permanently changes wal_level to logical and restarts all computes when enabled.
Neon enables logical replication at the project level, allowing PostgreSQL to emit row-level WAL information for logical decoding. After enabling it, configure PostgreSQL publications on the source database and subscriptions on the destination; Neon can serve as either side of the publisher-subscriber relationship.
neon projects update $PROJECT_ID --enable-logical-replication --yesneon projects update $PROJECT_ID --enable-logical-replication --yes
psql "$DATABASE_URL" -c "SHOW wal_level;"Enables logical replication for the project, then verifies that PostgreSQL reports the required WAL level.
Change data capture
Database migration
Cross-region resilience
Version upgrades
Neon enables logical replication per project. This changes PostgreSQL wal_level from replica to logical for every database in that project, providing the row-level WAL detail required for logical decoding.
Follow-up: What operational consequence follows immediately? The change is irreversible and enabling it restarts all computes, dropping active connections.
Logical replication uses PostgreSQL’s publisher-subscriber model. The publisher first provides an initial data snapshot, after which changes are delivered to the subscriber as they occur in real time.
Follow-up: Which database objects complete the setup? Create a publication on the source database and configure a subscription on the destination.
Neon can operate as either a publisher or a subscriber. To replicate data from Neon, enable logical replication on the Neon project; when replicating data to Neon, enable it on the source database instead.
Follow-up: What connection type should a replication client use? A direct connection to the compute endpoint is required because poolers do not provide the persistent connection logical replication needs.
wal_levelpublishersubscriberpublicationsubscriptionlogical decodingREPLICATION privilegedirect connection