Skip to content

nextgres/pgcluster-ii

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

PGCluster-IIe

Experimental active-active, shared-disk clustering for PostgreSQL, derived from Atsushi Mitani's PGCluster-II.

Warning

This is an unmaintained, proof-of-concept project shared as a thought experiment. It is nowhere near alpha quality, and is not intended for production use. See Status and Disclaimer before using it.

Overview

PGCluster-II was a shared-disk approach to Postgres clustering, in the spirit of Oracle Real Application Clusters (RAC). Unlike the shared-nothing approach most Postgres scale-out solutions use, this project allowed multiple Postgres nodes to operate over a single data directory, accessed via a cluster-aware filesystem on top of shared block storage. This repository is a modernized proof-of-concept derived from Atsushi Mitani's original PGCluster-II work.

History

The origins of this project trace back to 2006, when I attended the PostgreSQL 10th Anniversary Summit in Toronto, co-presenting a talk on PL/pgSQL debugging with Korry Douglas, one of the best people I've ever had the pleasure of working with. During the summit, Atsushi Mitani of SRA held a PGCluster round table where he began discussing PGCluster-II, an ambitious shared-disk clustering concept in the spirit of Oracle RAC. The idea caught my interest, and I started talking with him about it. He was kind enough to provide a copy of the code, though he cautioned that it was very much a work in progress.

A year later, at PGCon 2007, he gave another talk, PGCluster-II: Clustering system of Postgres that is using shared data, to update the community on his progress. Unfortunately, he eventually set the project aside, which is understandable. This is an extremely hard problem, and I've come to appreciate why Oracle is really the only vendor that has accomplished something this complex at scale. It's not a single-developer project; it requires a team of expensive, domain expert engineers, something I learned firsthand while managing Xpand (formerly Clustrix) at MariaDB.

Over the years, several other projects also shaped my thinking and approach. Even though this remains a shared-disk design and they take a shared-nothing approach. Postgres-XC/X2, its successor Postgres-XL, and more recently YugabyteDB each solved meaningful aspects of the distributed Postgres problem and offered solid concepts to work from. While their code wasn't directly useful, their architectures and design choices were a valuable source of ideas and deserve credit here.

I'm not a distributed systems expert; I know just enough to be dangerous. That's why I found this a fun project to learn something from, and kept working on it over the years. The last version I actively worked on was for PG13. After that, I had no more interest in carrying it forward.

Status

This is one of more than thirty or so massive, core-changing Postgres projects I've built over the years and never released, most of which haven't been worked on in a long, long time. With the help of AI-assisted coding, I've been able to port them to recent versions of Postgres and clean them up a little. That said, I have zero interest in maintaining or commercializing this, so I'm sharing it with the community as thought experiment and as inspiration for others to build on.

This particular project is a Claude-built port from Postgres 13 to 20devel with very little testing. It's a proof-of-concept that demonstrates many of the ideas but is not even alpha quality. While I may do a conference session on this, and may answer questions, I won't be doing any further development. Use it as a starting point, a learning resource, or a curiosity, not as something production-ready. Like Mitani's work, it is still built to operate with each active-active node running independently, but on a single machine using a shared Postgres cluster data directory; that's the easiest way to work toward correctness. Separating nodes over the network will most certainly create new issues.

References

The ./references directory preserves Atsushi Mitani's presentations and original patch against PostgreSQL 8.1.4. These are included to credit the original work and to give context to anyone exploring this repository. They remain under their original license and copyright.

License

This project is released under the Postgres License (see LICENSE), a permissive, BSD/MIT-style license. Portions derived from Atsushi Mitani's original PGCluster-II code, which was released under the BSD License, retain their original copyright and license notices in the relevant files.

Disclaimer

This is experimental, proof-of-concept code released for educational and research purposes. It is not production-ready, it is not maintained, and it is provided with no warranty of any kind, express or implied.

Nothing in this project should be read as a representation that the code is free of third-party patent, copyright, or other intellectual property claims. No patent search or clearance analysis has been performed. Anyone who chooses to use, distribute, or build on this code, particularly for any commercial purpose, does so at their own risk and is solely responsible for their own due diligence, including any patent or licensing review they deem necessary.

The author accepts no liability for any use of this code and provides no indemnification of any kind. See the LICENSE file for the full terms.

Acknowledgments

Atsushi Mitani of SRA, whose original PGCluster-II vision is the foundation of this work, and the teams behind Postgres-XC, Postgres-XL, and YugabyteDB, whose work provided valuable concepts and inspiration.

About

Experimental active-active, shared-disk Postgres clustering, derived from PGCluster-II

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors