What does HackerNews think of pg_auto_failover?

Postgres extension and service for automated failover and high-availability

Language: C

#13 in PostgreSQL
#17 in PostgreSQL
This is /extremely/ uncharitable. It depends more on the project.

For example, both Go and .NET are very well written engineering achievements with thorough documentation. Many, many other deeply influential projects have also been absorbed by the Apache Foundation or other FOSS initiatives.

Furthermore, every software megacorp has boat loads of teams working on hundreds even thousands (!) of different open source projects. The quality naturally varies.

Let me pick two more esoteric projects as a point of comparison.

Yandex Odyssey [0] an advanced multi-threaded PostgreSQL connection pooler and request router. Figuring out how exactly and when to use this is not quite clear. There is no "getting started" guide for this package. There is barely any explanation for how it works or what it does.

pg_auto_failover [1] run by Citus (owned by Microsoft) monitors and manages automated failover for a Postgres cluster. This repo even has diagrams explaining the workflow and complete instructions.

Frankly, it's unreal just how much code is open nowadays especially from the giants.

Visual Studio, for example, had been under lockdown for 20 years. Now Visual Studio Code is being developed in the open and has extremely thorough documentation that walks developers through the entire build process in painstaking detail.[2] This is a blazing fast editor written in JavaScript of all things! Or consider TypeScript, an incredible engineering feat. There is an entire repo dedicated to engineering notes on how the compiler works with links to interesting feature contributions and a video! [3]

I'm only picking Microsoft here as the primary example since you dumped on them the hardest.

*No other industry does this. It is absolutely wild how much copyleft influenced software culture.*

[0]: https://github.com/yandex/odyssey

[1]: https://github.com/citusdata/pg_auto_failover

[2]: https://github.com/microsoft/vscode/wiki/How-to-Contribute

[3]: https://github.com/microsoft/TypeScript-Compiler-Notes/

Hi everyone. A bit more than two years ago I released the first version of Postgres.js. A fully featured PostgreSQL driver for Node.js written as a learning experience out of curiosity and annoyance with the current options. It greatly outperformed the alternatives[1] using pipelining and prepared statements, while providing a much better development experience safe from SQL injections. Since then I've been busy building things using it, now running in production, and although quite delayed I'm so happy to release a new major today with some really exciting new features:

1. Realtime subscribe to changes through Logical Replication [2]

It's now possible to use logical replication to subscribe in realtime to any changes in your database with a simple api like `sql.subscribe('insert:events', row => ...)`. Inspired from Supabase Realtime you can now have it yourself in Node.

2. A Safe Dynamic Query Builder

Nesting the sql`` tagged template literal function allows building highly dynamic queries while staying safe and using parameterized queries at the same time.

3. Multi-host connection URLs for High Availability support

It's really nice to be able to quickly spin up a High Availability Postgres setup using pg_auto_failover[3] and connect using Postgres.js with automatic failover and almost 0 downtime.

4. Deno support

It also works with Deno now, completing all tests except a few SSL specific ones which requires fixes in Deno.

5. And much more

Large object support, efficient connection handling for large scale use, cancellation of requests, Typescript suport, async cursors.

[1] https://github.com/porsager/postgres-benchmarks#results

[2] https://github.com/porsager/postgres#realtime-subscribe

[3] https://github.com/citusdata/pg_auto_failover

I would definitely say pg-auto-failover[1]. It's the only one that doesn't have a ton of moving parts, and it helps you get a good base setup too at the same time.

[1]: https://github.com/citusdata/pg_auto_failover

Not multi-master, but pg_auto_failover looks to be a very nice solution for HA, and one that is operationally simple to manage: https://github.com/citusdata/pg_auto_failover
You should have a look at https://github.com/citusdata/pg_auto_failover

This project makes is super easy to setup a resilient and highly-available postgresql cluster.

And since the postgresql client lib handle connection to multiple replica... no need for some kind of load-balancer (pg_bouncer, pgpool...) in front of it anymore (even if they can still be useful sometimes).

Citus released this last year: https://github.com/citusdata/pg_auto_failover It looks interesting although I haven't used it, I tried doing it with corosync + pacemaker.
> Yes, maybe there will be built in automatic fail over in a few years so you don't have to hack it together using a bunch of scripts.

thanks microsoft !!

https://github.com/citusdata/pg_auto_failover