Back to browse
GitHub Repository

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

13 starsGo

Pgconverge – An experimental multi-master PostgreSQL framework in Go

by sobowalebukola·Jul 5, 2026·1 point·0 comments

Post Description

Hi HN,

Over the past few months I've been building pgconverge, an experimental open-source framework for operating multi-master PostgreSQL clusters.

The project started as a learning exercise to better understand distributed databases rather than as an attempt to replace PostgreSQL's existing replication model. My goal was to explore what it would take for multiple PostgreSQL nodes to accept writes independently while eventually converging without relying on a designated primary database. Over time, the experiment evolved into a working open-source framework.

Some of the areas I explored include:

full-mesh replication topology conflict resolution using Last-Write-Wins Hybrid Logical Clocks for ordering concurrent writes bootstrapping new nodes into an existing cluster declarative cluster configuration

Along the way I documented the design decisions in a seven-part engineering series:

Why Multi-Master? The Problem with Single-Writer Databases

https://blog.stackademic.com/why-multi-master-the-problem-wi...

Inside pgconverge: Navigating the N × (N − 1) Complexity of Full-Mesh Replication

https://blog.stackademic.com/inside-pgconverge-navigating-th...

Identity Crisis: How pgconverge Uses UUIDs, Node Names, and Distributed Primary Keys

https://blog.stackademic.com/identity-crisis-how-pgconverge-...

Last-Write-Wins: The Simplest Conflict Resolution and Its Limits in pgconverge

https://blog.stackademic.com/last-write-wins-the-simplest-co...

pgconverge with Hybrid Logical Clocks: When Wall Clocks Are Not Enough

https://blog.stackademic.com/pgconverge-with-hybrid-logical-...

Bootstrapping New Nodes in pgconverge: pg_basebackup vs COPY Data

https://blog.stackademic.com/bootstrapping-new-nodes-in-pgco...

Operating Multi-Master PostgreSQL Clusters with pgconverge

https://blog.stackademic.com/operating-multi-master-postgres...

Similar Projects

Infrastructure●●Solid

Pg-status – lightweight HTTP sidecar for PG master/replica discovery

Lightweight C sidecar for PG status avoids heavy orchestrators like Patroni or Consul.

Solve My ProblemDark Horse
krylosov-aa
3021d ago

A Working Python VM Written Entirely in PL/PgSQL

This repo literally turns CPython internals into rows and stored procedures: object rows, regproc type slots, and an interpreter loop (py_eval_frame) that dispatches opcode handler functions in SQL. It's a clever, hands-on exploration — 103 SQL files, a REPL and 87 tests show serious follow-through — but it's primarily an impressive engineering demo rather than a practical production runtime.

WizardryNiche Gem
cykim8811
114mo ago