A Golang webserver that streams Postgres logical replication changes at-least-once over WebSockets.
PGDeltaStream is a stateless Go service that streams PostgreSQL table changes in real-time over WebSockets using PostgreSQL's logical decoding feature. It provides at-least-once delivery guarantees by allowing clients to take a snapshot of current data and then stream subsequent changes, with the ability to acknowledge offsets to resume from the last consumed position.
Developers and engineers building real-time applications, data pipelines, or event-driven systems that need reliable, low-latency change data capture (CDC) from PostgreSQL databases. It is particularly useful for those implementing custom replication solutions or streaming database events to external services.
Developers choose PGDeltaStream for its simplicity and reliability as a reference implementation of PostgreSQL logical replication in Go, offering a straightforward way to stream database changes with at-least-once delivery without managing persistent state. Its stateless design and built-in snapshot initialization simplify deployment and ensure no event data is lost during client reconnections.
Streaming Postgres logical replication changes atleast-once over websockets
Leverages Postgres' built-in logical replication to stream WAL changes in real-time over WebSockets, providing low-latency data capture directly from the database.
Guarantees no event loss by using LSN acknowledgment, allowing clients to resume streaming from the last consumed position after reconnections.
Includes an HTTP endpoint to fetch initial table data from the replication slot's snapshot, simplifying state synchronization before streaming changes.
Runs as a standalone service without persistent state, making deployment straightforward and reducing operational overhead.
Designed for only one replication slot at a time; any new init call deletes the existing slot, preventing concurrent streaming or multi-tenant use.
As a reference boilerplate, it lacks advanced CDC features like change filtering, batching, or built-in security, requiring client-side or custom modifications.
Requires non-trivial Postgres configuration (wal_level = logical, max_replication_slots) and wal2json installation, which can be a barrier for less experienced users.
Streaming replication for SQLite.
Sync data from one Postgres database to another
A lightweight replication manager for PostgreSQL (Postgres)
Distributed Data Transfer Service for MySQL
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.