Hacker News new | ask | show | jobs
by homebrewer 521 days ago
I'm hoping for seamless upgrades at some point, like MySQL does it — you install the next major version and restart the daemon. It's completely unnecessary for major operators, but is a life-saver for small businesses, websites that don't need 99.99999% of uptime (i.e. almost all of them), in development, etc.
1 comments

How do updates work with postgres?
Well, three ways:

1. Dump a backup to disk, then restore from dump on new version;

2. Stop the old version, then run `pg_upgrade --link` on the data of the old version which should create a new data directory using hardlinks, then start the new version using the new data directory. This is rather quick; or

3. Use Logical Replication to stand up the new version. This has ... a few caveats.

You do a backup on the old version and a restore on the new one.

From what I understood, sometimes the way data is written to disk differently between versions and they're not compatible. I guess due to optimizations or changes in the storage engine?