pgstream
pgstream is a free, open-source CDC command-line tool and Go library for replicating PostgreSQL data and schema changes to other destinations.
What pgstream is
pgstream is a free, open-source CDC command-line tool and Go library for replicating PostgreSQL data and schema changes to other destinations. Built-in targets include PostgreSQL, Elasticsearch and OpenSearch, Kafka, and webhooks. It can take initial or on-demand snapshots for bulk loading or point-in-time copies, while tracking DDL changes so receiving systems can follow table updates. Column values can be transformed during replication using greenmask, neosync, go-masker, or custom transformers, including for masking data copied to development or staging. pgstream can run as a standalone CLI or be embedded as a Go library, and PostgreSQL is its dependency. The project is self-hosted and licensed under Apache License 2.0. Installation options include a Go binary, building from source, and Homebrew on macOS or Linux. Listed initial-release limitations include support for one Kafka topic, only the wal2json PostgreSQL plugin, no row-level filtering, and a requirement for a primary key or unique non-null column. Kafka support includes schema-based partitioning. Questions and issues are directed to GitHub issues.
Good
- Replicates data and schema changes together.
- Supports initial and on-demand snapshots.
- Can mask values during replication with transformers.
- Runs as a CLI or Go library.
- Apache 2.0 licensed and self-hosted.
Watch out
- Supports only one Kafka topic.
- Uses only the wal2json PostgreSQL plugin.
- Does not support row-level filtering.
- Requires a primary key or unique non-null column.
Who it suits
pgstream suits developers and data teams that need to replicate PostgreSQL data and schema changes to other systems. It can also help teams keep staging databases aligned with production or bootstrap targets using snapshots.
Verdict
pgstream provides PostgreSQL replication with snapshots, schema tracking, and value transformation in a self-hosted tool. Check its initial-release constraints, including Kafka topic support and the required key column, against your data setup.
Plans and prices
From pgstream's own pricing page, checked 4 Oct 2026.
| Plan | Price | What it gives you |
|---|---|---|
| pgstream | Free | Open-source CDC CLI and Go library · Apache 2.0 license |
The facts
Each one read from pgstream's own pages, with the date it was checked.
What it does
- Anonymization
- Column values can be transformed during replication using greenmask, neosync, or go-masker integrations.checked 4 Oct 2026
- DDL tracking
- It tracks and replicates schema changes alongside data changes so downstream targets can follow table changes.checked 4 Oct 2026
- Deployment
- pgstream can run as a standalone CLI or be embedded as a Go library, and requires PostgreSQL as a dependency.checked 4 Oct 2026
- Deployment dependency
- The product page says pgstream requires PostgreSQL as its only dependency and does not require ZooKeeper or Kafka.checked 4 Oct 2026
- Installation
- The docs describe installing from a Go binary, building from source, or using Homebrew on macOS or Linux.checked 4 Oct 2026
- Intended use
- The product page describes using pgstream to keep staging databases in sync with production and to bootstrap targets with snapshots.checked 4 Oct 2026
- Interfaces
- pgstream can run as a standalone CLI tool or be embedded as a Go library.checked 4 Oct 2026
- Kafka support
- Kafka support includes schema-based partitioning.checked 4 Oct 2026
- License
- The project is licensed under Apache License 2.0.checked 4 Oct 2026
- Limitations
- The README lists single Kafka topic support, wal2json-only Postgres plugin support, no row-level filtering, and a primary-key or unique non-null column requirement as limitations of the initial release.checked 4 Oct 2026
- Purpose
- pgstream is an open-source CDC tool for replicating PostgreSQL data and DDL schema changes to targets.checked 4 Oct 2026
- Schema changes
- It tracks and replicates schema changes alongside data changes.checked 4 Oct 2026
- Security
- The product page describes built-in anonymization for masking production data as it is replicated to development or staging.checked 4 Oct 2026
- Snapshots
- It supports initial and on-demand PostgreSQL snapshots for bulk loads or point-in-time copying without continuous replication.checked 4 Oct 2026
- Support
- The project README directs users with questions or issues to open a GitHub issue for community assistance.checked 4 Oct 2026
- Targets
- Built-in targets include PostgreSQL, Elasticsearch/OpenSearch, Kafka, and webhooks.checked 4 Oct 2026
The company
- Maker founded
- Xata says it formed in 2021.checked 4 Oct 2026
- Maker security
- Xata states that it is SOC 2, HIPAA, and GDPR compliant; this statement describes Xata and does not specify pgstream as a separately certified product.checked 4 Oct 2026
The full review of pgstream
pgstream is a free, open-source PostgreSQL change-data-capture tool, available as a command-line program or Go library. It suits teams operating their own PostgreSQL infrastructure who need to replicate data and schema changes. Its snapshots and masking options are useful, but initial-release limits make it a poor fit for pipelines that need row-level filtering or broader Kafka topic support.
Overview
pgstream uses log-based capture to replicate PostgreSQL data and DDL changes to PostgreSQL, Elasticsearch or OpenSearch, Kafka, and webhooks. Tracking schema changes alongside row changes helps downstream targets keep up when tables evolve, rather than receiving data updates alone.
Teams can run it as a standalone CLI or embed it as a Go library. PostgreSQL is its only stated dependency; pgstream does not require ZooKeeper or Kafka to run. That is a focused deployment footprint, but self-hosting still means your team is responsible for operating the tool and its database environment. The project is licensed under Apache License 2.0, and its README points users to GitHub issues for community assistance.
Key features
Snapshots and replication
Initial snapshots can bootstrap a target with a bulk load, while on-demand snapshots support point-in-time copies. Ongoing log-based replication then keeps changes moving. This combination is well suited to initializing a target or keeping a staging database in step with production without treating the initial load as a separate problem.
Schema tracking and destinations
Because pgstream carries DDL changes as well as data changes, it can help downstream systems follow table changes. Built-in targets include PostgreSQL, Elasticsearch and OpenSearch, Kafka, and webhooks. Kafka support includes schema-based partitioning, but the initial release supports a single Kafka topic, a meaningful constraint for teams dividing events across topics.
Column transformation
Column values can be transformed during replication with greenmask, neosync, go-masker, or custom transformers. This gives teams a way to mask production data as it moves into development or staging environments, reducing exposure in those copies. It does not remove the need to decide which transformations suit the data and destination.
Initial-release constraints
The initial release supports only the wal2json PostgreSQL plugin and has no row-level filtering. It also requires a primary key or a unique, non-null column. These limits narrow its usefulness for sources that cannot meet that key requirement, or pipelines that need selective row capture or multiple Kafka topics.
Pricing
pgstream costs nothing. The free plan is the open-source CDC CLI and Go library under Apache License 2.0, with no paid tier described. That makes it accessible to teams willing to run it themselves; the trade-off is community assistance through GitHub issues rather than a stated paid support plan.
Platforms
pgstream supports Linux and macOS and is self-hosted. Installation options include a Go binary, building from source, or Homebrew on macOS or Linux. Its CLI and Go library forms give teams a choice between running it directly and embedding it in Go software, but it is not a managed service.
Who it's for
pgstream is a strong fit for teams that already operate PostgreSQL and want to keep staging databases or other supported targets current, especially when initial snapshots, DDL replication, or masking production values matter. It is less suitable when a pipeline needs row-level filtering, a PostgreSQL plugin beyond wal2json, or more than one Kafka topic. Teams unable to provide a primary key or unique non-null column should also look elsewhere.
Pros and cons
- Pros: Initial and on-demand snapshots support both bulk bootstrap and point-in-time copies.
- Pros: Replicating DDL alongside data helps downstream targets follow schema changes.
- Pros: Column transformation options support masking data as it moves to development or staging.
- Pros: The Apache-licensed CLI and Go library can run without ZooKeeper or Kafka as dependencies.
- Cons: The initial release supports only one Kafka topic and the wal2json PostgreSQL plugin.
- Cons: No row-level filtering limits pipelines that need selective replication.
- Cons: A primary key or unique non-null column is required, which can rule out some source tables.
- Cons: Self-hosting and community assistance through GitHub issues place operations and support expectations on the adopting team.
Alternatives
Canal is another free, open-source option for teams seeking a self-hosted CDC tool across Linux and macOS, with an API platform also listed.
Sequin offers a free, self-hosted open-source option for teams that want to run it on their own infrastructure, with API and web platforms also listed.
Apache Flink CDC is a free Apache-licensed choice for teams needing a CDC option across Linux, macOS, Windows, and self-hosted environments.
Debezium is a free, Apache-licensed distributed change-data-capture platform for teams seeking that broader platform approach, with API, Linux, and Windows platforms listed.
dbmazz offers a free self-hosted open-source engine with a CLI, terminal dashboard, local web UI, and community support.
Estuary is a freemium option with a free plan and trial; its Pay-as-you-go plan is $100 a month, billed monthly. Choose it when a freemium offering is preferable to a wholly self-hosted open-source tool.
Striim is a freemium alternative with a free plan and trial, including a developer plan with 25 million events per month; it may suit readers comparing event-based usage limits.
TiCDC is another free, open-source CDC option for Linux, macOS, and self-hosted environments, with API also listed.
Browse Change Data Capture Software for more options.
Verdict
Choose pgstream if your team can self-host and wants PostgreSQL replication that carries schema changes, supports snapshots, and can mask values on the way to staging or other targets. Its free Apache-licensed distribution and focused dependency footprint are compelling; look elsewhere if you need row filtering, a different PostgreSQL plugin, or multiple Kafka topics.
Alternatives to pgstream
- 1
Estuary
Free planWebAPILinuxmacOS7.9$0.50 usage-based - 2
TiCDC
Free planOpen sourceAPILinuxmacOSSelf-hosted7.2Free plan - 3

Google Cloud Datastream
Free planWebAPI6.8From $0.40 a month - 4

PeerDB
Free planWebAPISelf-hosted6.8From $250 a month - 5
Debezium
Free planAPILinuxSelf-hostedWindows6.6Free plan - 6

Decodable
Free planWebAPISelf-hosted6.6From $0.10 a year
