PGSync
Real-time data synchronization from PostgreSQL, MySQL, and MariaDB to Elasticsearch and OpenSearch—continuously and transactionally.
New · PGSync Pro
Real-time semantic & hybrid search on top of PGSync — vectors kept fresh by change data capture, re-embedded only when meaning changes. Explore PGSync Pro
What is PGSync?¶
PGSync is a lightweight middleware that captures changes from your relational database and writes structured, denormalized documents to your search cluster.
Define your document schema once in JSON, and PGSync handles change capture, ordering, and delivery automatically—no custom ETL code required.
-
Change Data Capture
Automatically captures INSERT, UPDATE, and DELETE using logical replication
-
Low Overhead
Minimal impact on database performance
-
Fault Tolerant
Resumes from last checkpoint after crashes
-
Nested Documents
Transform relational data into deeply nested JSON
Quick Start¶
$ pip install pgsync
---> 100%
Successfully installed pgsync
Define your schema in JSON:
{
"database": "mydb",
"index": "books",
"nodes": {
"table": "book",
"children": [{ "table": "author" }]
}
}
Then start syncing:
$ pgsync --config schema.json --daemon
Editions¶
PGSync is free and open source. PGSync Pro builds on it to add real-time semantic and hybrid search — with change-guard economics that keep it affordable at scale.
-
PGSync · Community
Free & MIT. Real-time sync from PostgreSQL / MySQL / MariaDB to Elasticsearch / OpenSearch — change data capture, denormalized documents, and the Django integration.
-
PGSync · Pro
Everything in Community, plus semantic & hybrid search that re-embeds only when meaning changes, hosted embedding providers, and an MCP server for AI agents.
PGSync is supported by DigitalOcean.