Re:How we upgraded our 4TB Postgres database
by Symbiote on Wednesday April 20, 2022 @02:32AM
(#31093522)
I would use the existing nodes (just like the SQL Server upgrade, you have reduced redundancy during the upgrade).
Under 1 minute of downtime was acceptable for us, so:
systemctl stop postgresql-11 && \
pg_upgrade --link ... && \
systemctl start postgresql-12
was more-or-less the process last time I did this. We have only 500GB of data, and I think pg_upgrade ran in 15 seconds or so.If a minute of downtime isn't acceptable, then it presumably isn't acceptable in case of unexpected hardware failure either, and you'd be using one of the commercial multi-master extensions.
Here's a nice thing about PostgreSQL over SQL Server to satiate the fans: SQL Server is absurdly expensive to run in the cloud. I can't believe anyone uses RDS for SQL Server. Even in EC2 it's horrifically expensive. That's the main reason we have an on-prem cluster.