Hacker News new | ask | show | jobs
by mehrau 693 days ago
Anyone knows why upgrading postgres is shit?

I love postgres but every major upgrade needs weird interventions...

3 comments

Because major version upgrades for sensitive infrastructure are just not simple. There is a lot that can go wrong. Postgres lets you do this step manually to avoid losing your production data. I mean look at what happened yesterday with people just installing any update automatically. Critical infrastructure maybe should need a manual process just to make sure people do the right thing
Online upgrades in general are difficult.

Imagine there are changes to the physical format for example, now you need to make sure all code works with both the new and the old format during the upgrade (as some pages will have been updated and others not). Supporting both versions requires temporary backwards compatibility code, bloating the codebase, and introduces a risk of error and increases the complexity of the system.

Since Postgres prioritises correctness probably more than any other database system I know, I’d guess they don’t want to expose themselves to the risk of error.

Why doesn't postgres automatically (or with one-click confirmation) update all databases on startup when it discovers databases from a previous major version?
It's getting closer with pg_upgrade. That just wasn't a priority as early as it was for MySQL. Give it time.

For large DBs though you may not be able to wait for it to happen offline.

They could provide a upgrader.

It's a scale issue. If one does it for all, less work for everyone :)

Doesn't the linked post answer your question in the first few sentences?
Nope. It doesn't say why the process itself is cumbersome.

They just state that it is for various reasons.

And I'm not even talking about upgrading without downtime I mean the problem that you can't just replace 14 with 15 without preparing the DB upfront.