Live data from Hacker News

Minimal downtime major PostgreSQL version upgrades with pg_easy_replicate

github.com

61–63 of 63 posts

Re: Minimal downtime major PostgreSQL version upgrades with pg_easy_replicate

#61
post #48

Requirements ... Ruby 2.7 and later Damn. This looked interesting right up until the Ruby requirement. :(

How is this valid criticism? This is an excellent use of a scripting language.

I would prefer to not have to install a new language on the server. There's Python and Perl already; you would certainly cover nearly all Linux installations with these two.

But it's a nice tool anyway.

Re: Minimal downtime major PostgreSQL version upgrades with pg_easy_replicate

#62
post #53

Earlier quoted context omitted.

Simple LB like Haproxy works fine for this and similar cases. In very nutshell, Haproxy executes checks every n seconds (in your case it can be readonly mode checks ) and disables that upstream. We use it over Mysql/Pg+patroni/Redis and works fine - we made tests for low load though, just up to 5k qps fot PG case and up to 80k rps for Redis case.

This can be done with pgbouncer and you can suspend the database so pgbouncer "holds" connections. If the application has high enough timeouts, it will look like it's just taking longer than normal to connect.

That specific case and if you can afford PgBouncer, I agree with you.

On a wider scale, Haproxy adds value - auto tracking on sync/async replicas, replica lag windows, falling back on master if all replicas lagging/down, so on.

Re: Minimal downtime major PostgreSQL version upgrades with pg_easy_replicate

#63

There is also a new (OpenSource) Postgres extension that claims to provide multi-master replication based on logical replication, BDR and pglogical https://pgedge.github.io/spock/ which can also be used for online upgrades. It however only supports Postgres 15 and (not yet released) 16

spock and pgedge are cool, but they are NOT open source (and they try hard to make it look like they are).

It is under the Confluent license (with s/confluent/pgedge/), basically a source-available-but-Amazon-cannot-use-it kind of license.

Post reply on HN