---
title: "Change Data Capture with Serverless Postgres"
description: "Neon has released Postgres logical replication in beta, letting Neon databases act as publishers that stream an initial snapshot plus row-level changes to external stores for change data capture and real-time analytics."
url: "https://swe.quest/articles/change-data-capture-with-serverless-postgres-4d667a8d26488042"
canonical: "https://neon.com/blog/change-data-capture-with-serverless-postgres"
source: "Neon"
published: "2023-12-21"
difficulty: "medium"
kind: "Announcement"
reading_minutes: 7
tags: ["postgres","replication","event-driven","serverless"]
---

# Change Data Capture with Serverless Postgres

A post on [Neon](https://swe.quest/sources/neon.md), published 2023-12-21, 7 min read, Announcement. Original: [https://neon.com/blog/change-data-capture-with-serverless-postgres](https://neon.com/blog/change-data-capture-with-serverless-postgres)

## Summary

Neon has released Postgres logical replication in beta, letting Neon databases act as publishers that stream an initial snapshot plus row-level changes to external stores for change data capture and real-time analytics. Under the hood, the walsender decodes the WAL through an output plugin: pgoutput for Postgres-to-Postgres replication, and newly supported wal2json for systems such as Kafka or Materialize. Enabling it is irreversible and restarts the compute. Neon can't act as a subscriber yet, active subscribers can prevent scale-to-zero, DDL changes are not replicated, and replication lag should be monitored.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [PostgreSQL](https://swe.quest/tags/postgres.md) (Data & databases)
- [Replication](https://swe.quest/tags/replication.md) (Distributed systems)
- [Event-driven architecture](https://swe.quest/tags/event-driven.md) (Backend & APIs)
- [Serverless](https://swe.quest/tags/serverless.md) (Backend & APIs)

## Prerequisites

- PostgreSQL basics ([easy posts on PostgreSQL](https://swe.quest/tags/postgres.md?difficulty=easy))
- write-ahead logging ([easy posts on Observability](https://swe.quest/tags/observability.md?difficulty=easy))

## Keywords

Neon, logical replication, wal2json, pgoutput, Change Data Capture, Materialize, Kafka

## Related posts

- [Stream data from Neon to external data sources via logical replication](https://swe.quest/articles/stream-data-from-neon-to-external-data-sources-via-logical-replication-ba0a37ed2d47496f.md): Neon · 2024-08-09 · Medium · 7 min read · PostgreSQL, Replication, Event-driven architecture, Data pipelines
  Neon now supports outbound Postgres logical replication in beta, letting a Neon database publish WAL-decoded inserts, updates and deletes to warehouses, Kafka, CDC tools and other Postgres databases; inbound replication is coming later.
- [Change Data Capture with Neon and Materialize](https://swe.quest/articles/change-data-capture-with-neon-and-materialize-b7e8c6b1f01b6525.md): Neon · 2023-12-21 · Medium · 4 min read · Event-driven architecture, PostgreSQL, Replication, Stream processing
  Neon's logical replication support lets Materialize ingest Postgres changes directly via the native replication protocol, without Debezium or other extra infrastructure, while keeping transactional consistency.
- [Postgres Meets Analytics: CDC From Neon to ClickHouse Via PeerDB](https://swe.quest/articles/postgres-meets-analytics-cdc-from-neon-to-clickhouse-via-peerdb-669fe8e963909dd5.md): Neon · 2024-10-02 · Medium · 5 min read · PostgreSQL, Event-driven architecture, Analytics & OLAP, Replication, Data pipelines
  Neon serverless Postgres can serve as the transactional system of record while ClickHouse handles real-time analytics, with PeerDB streaming changes between them via Postgres logical replication.
- [A Guide to Logical Replication and CDC in PostgreSQL with Airbyte](https://swe.quest/articles/a-guide-to-logical-replication-and-cdc-in-postgresql-with-airbyte-4e37edf2ac1b986b.md): Neon · 2024-01-11 · Medium · 9 min read · PostgreSQL, Replication, Event-driven architecture, Data pipelines
  PostgreSQL logical replication builds on the write-ahead log: logical decoding turns byte-level WAL records into row-level INSERT/UPDATE/DELETE changes, and replication slots track each subscriber's LSN while retaining WAL until it is consumed.
- [Fan-out from Postgres with Change Data Capture using Debezium and Upstash Redis](https://swe.quest/articles/fan-out-from-postgres-with-change-data-capture-using-debezium-and-upstash-redis-1afcb52ed56a9566.md): Neon · 2024-02-14 · Medium · 9 min read · Event-driven architecture, PostgreSQL, Queues & messaging, Replication
  Streaming committed Postgres changes from the write-ahead log via a logical replication slot avoids the dual-write problem, where an application writes to the database and a message broker separately and can leave them inconsistent.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
