pgstream
xata.io
- Free plan
- macOS
- Linux
- Self-hosted
What pgstream is
pgstream is an open-source change data capture tool for replicating PostgreSQL data and schema changes to other systems. It runs as a command-line application or can be embedded as a Go library. Destinations include PostgreSQL, Elasticsearch and OpenSearch, Kafka, and webhooks. It can take an initial snapshot or create one on demand for bulk loads and point-in-time copies, while tracking schema changes alongside data so downstream targets can follow table updates. Column values may be transformed during replication with greenmask, neosync, go-masker, or custom transformers, including for masking production data copied to development or staging. Kafka support includes schema-based partitioning. pgstream is self-hosted, requires PostgreSQL, and does not require ZooKeeper or Kafka as dependencies. It is licensed under Apache License 2.0 and is free. Installation options include a Go binary, building from source, or Homebrew on macOS and Linux. The initial release has limits: one Kafka topic, the wal2json PostgreSQL plugin only, no row-level filtering, and a primary-key or unique non-null column requirement.
Who it suits
pgstream suits teams that need to replicate PostgreSQL data and schema changes to other targets or keep staging databases aligned with production. It may also fit developers embedding CDC in Go applications.
Good to know, and what to watch
- Runs as a CLI or an embeddable Go library.
- Supports initial and on-demand snapshots.
- Can transform column values during replication.
- Tracks schema changes alongside data changes.
- Requires PostgreSQL but not ZooKeeper or Kafka.
- Supports only one Kafka topic.
- Supports only the wal2json PostgreSQL plugin.
- Does not provide row-level filtering.
- Requires a primary key or unique non-null column.
Plans
Every plan and pricepgstream
Open source
Getting started
- Open the pgstream project website
- Install a Go binary, build from source, or use Homebrew on macOS or Linux
- Provide PostgreSQL, the product’s required dependency
- Choose the standalone CLI or embed pgstream as a Go library
- Connect replication to a supported target such as PostgreSQL, Elasticsearch/OpenSearch, Kafka, or a webhook
Limits to check
The initial release supports one Kafka topic, uses only the wal2json PostgreSQL plugin, and has no row-level filtering. Replicated tables require a primary key or a unique non-null column.
The verdict
pgstream offers a self-hosted route for replicating PostgreSQL data, schema changes, and snapshots across several target types. Its initial-release limits around Kafka topics, filtering, and key requirements may affect fit.
Questions people ask
Is pgstream free?
Yes. The listed pgstream plan costs nothing, and the project is open source under Apache License 2.0.
Which platforms can run pgstream?
It supports Linux, macOS, and self-hosted deployment. Homebrew installation is described for macOS or Linux.
What destinations are built in?
Built-in targets are PostgreSQL, Elasticsearch/OpenSearch, Kafka, and webhooks.
Can pgstream copy schema changes?
Yes. It tracks database-definition changes alongside data changes and replicates them to downstream targets.
Does it need Kafka or ZooKeeper?
PostgreSQL is its only dependency; the product page says it does not require ZooKeeper or Kafka to run.
How is support handled?
The project README directs questions and issue reports to GitHub issues for community assistance.
What the maker publishes
- Anonymization
- Column values can be transformed during replication using greenmask, neosync, go-masker, or custom transformers. source
- Anonymization
- Column values can be transformed during replication using greenmask, neosync, or go-masker integrations. source
- DDL tracking
- It tracks and replicates schema changes alongside data changes so downstream targets can follow table changes. source
- Deployment
- pgstream can run as a standalone CLI or be embedded as a Go library, and requires PostgreSQL as a dependency. source
- Deployment dependency
- The product page says pgstream requires PostgreSQL as its only dependency and does not require ZooKeeper or Kafka. source
- Installation
- The docs describe installing from a Go binary, building from source, or using Homebrew on macOS or Linux. source
- Installation
- The project provides a Go binary and Docker image, and its repository documents installation with Go, source builds, and Homebrew on macOS or Linux. source
- Intended use
- The product page describes using pgstream to keep staging databases in sync with production and to bootstrap targets with snapshots. source
- Interfaces
- pgstream can run as a standalone CLI tool or be embedded as a Go library. source
- Kafka support
- Kafka support includes schema-based partitioning. source
- License
- The project is licensed under Apache License 2.0. source
- 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. source
- Maker founded
- Xata says it formed in 2021. source
- 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. source
- Purpose
- pgstream is an open-source CDC command-line tool and Go library for replicating PostgreSQL data and DDL changes to targets. source
- Purpose
- pgstream is an open-source CDC tool for replicating PostgreSQL data and DDL schema changes to targets. source
- Schema changes
- It tracks and replicates schema changes alongside data changes. source
- Security
- The product page describes built-in anonymization for masking production data as it is replicated to development or staging. source
- Snapshots
- It supports initial and on-demand PostgreSQL snapshots for bulk loads or point-in-time copies. source
- Snapshots
- It supports initial and on-demand PostgreSQL snapshots for bulk loads or point-in-time copying without continuous replication. source
- Support
- The project README directs users with questions or issues to open a GitHub issue for community assistance. source
- Targets
- Built-in targets include PostgreSQL, Elasticsearch/OpenSearch, Kafka, and webhooks. source
Checked against the maker's pages on 4 Oct 2026.