Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Now we only need easy self-hosted Postgres clustering for HA. Postgres seems to need additional tooling. There is Patroni, which doesn't provide container images. There is Spilo, which provides Postgres images with Patroni, but they are not really maintained. There is a timescaledb-ha image with Patroni, but no documentation how to use it. It seems the only easy way for hosting a Postgres cluster is to use CloudNativePG, but that requires k8s.

It would be awesome to have easy clustering directly built-in. Similar to MongoDB, where you tell the primary instance to use a replica set, then simply connect two secondaries to primary, done.



Postgres is not a CP database, and even with synchronous replication, it can lose writes during network partitions. It would not pass the Jepsen test suite.

This is very hard to fix and requires significant architectural changes (like Yugabyte or Neon have done).


> Postgres is not a CP database, and even with synchronous replication, it can lose writes during network partitions.

Argument is that partitioning almost never happens, because of network reliably rerouting traffic.


Reliable networks don't actually exist[1].

Clearly, it's possible to reduce the risk to the point where many companies are willing to accept it, but it's still a problem and comes with high operational costs. And for some use cases (like finance), even a small risk of undefined database behavior or lost writes is unacceptable.

The future are distributed databases with consensus, and unfortunately, Postgres isn't there yet.

[1]: https://aphyr.com/posts/288-the-network-is-reliable


reliable network and partitioning are two different things.

If your network is down, your clients can't connect DB too, and nothing works. State of network partitioning is harder to achieve, its more like if connection between two datacenters is down where DB replicas live, which is more rare because of all global connection redundancy.


It's really the same thing. Network partitions can (and do) occur within a single DC.

> If your network is down, your clients can't connect DB too, and nothing works

This sounds simple, but can only be achieved with high certainty using distributed consensus.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: