{"repo":"sobowalebukola/pgconverge","free":true,"listed":false,"github":"https://github.com/sobowalebukola/pgconverge","clone":"git clone https://github.com/sobowalebukola/pgconverge.git","description":"Multi-master PostgreSQL replication from JSON. Define your nodes and schema, pgconverge generates the SQL, Docker infrastructure, and full-mesh bidirectional replication with automatic conflict resolution","language":"Go","stars":17,"topics":["data","database-engineering","distributed-systems","postgres","postgresql","system-design"],"license":"MIT","category":"databases-storage","readme_excerpt":"pgconverge A Go CLI tool and library for setting up and managing bidirectional PostgreSQL logical replication across multiple nodes. Define your nodes and schema in JSON, and pgconverge generates the SQL, Docker infrastructure, and replication topology automatically. How It Works pgconverge sets up a full-mesh multi-master replication topology. Every node publishes its changes to all other nodes, and subscribes to changes from all other nodes. This means a write on any node is replicated everywhere. Under the hood, it uses PostgreSQL's built-in logical replication (publications and subscriptions). Conflicts are resolved using either a simple last-write-wins strategy (based on updated at timestamps) or a Hybrid Logical Clock (HLC) for tables that opt into CRDT mode. Primary keys defined as serial are automatically converted to UUIDs to avoid cross-node collisions. What Gets Generated From two JSON config files ( nodes.json and schema.json ), pgconverge generates: - generated.sql -- DDL with tables, UUID primary keys, conflict resolution triggers, replica identity settings, and indexes - docker-compose.yml -- Docker services for each node running PostgreSQL 16, with volumes, port mappings, and an entrypoint script that handles bootstrapping and replication setup Bootstrap Flow (Docker) When Docker containers start, each node's entrypoint script: 1. Clones data from an existing node via pg basebackup (if the data directory is empty and a donor is available), or initializes as a ","default_branch":null,"files":null,"tree":[],"storefront":"/r/sobowalebukola","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/sobowalebukola/pgconverge/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}