I just finished a gnarly postgresql migration @ home for my personal stuff. Started Thursday night, was slowly chipping away at it all weekend.
Main lessons learned:
Do not try to cross-upgrade extensions. If you're upgrading postgres from e.g. 10 to 12, keep extensions (for me postgis and timescaleb) the same version.
This can be hard with strictly apt packages on one version of Ubuntu, making intermediate versions of your database that run in docker and are able to install old versions of things is nice.
It was much easier to upgrade extensions on v10 to match the installable versions on v12 than to go the other way.
Always remember to backup and validate your backup before you try anything like this!
Saving this here, mostly for myself.
/usr/lib/postgresql/12/bin/pg_upgrade --old-datadir=/virt/postgresql_data/postgresql/10/main --new-datadir=/virt/postgresql_data/postgresql/12/main --old-bindir=/usr/lib/postgresql/10/bin --new-bindir=/usr/lib/postgresql/12/bin --old-options '-c config_file=/etc/postgresql/10/main/postgresql.conf' --new-options '-c config_file=/etc/postgresql/12/main/postgresql.conf'
6th July 2020
I won't ever give out your email address. I don't publish comments but if you'd like to write to me then you could use this form.
I'm Issac. I live in Oakland. I make things for fun and money. I use electronics and computers and software. I manage teams and projects top to bottom. I've worked as a consultant, software engineer, hardware designer, artist, technology director and team lead. I do occasional fabrication in wood and plastic and metal. I run a boutique interactive agency with my brother Kasey and a roving cast of experts at Kelly Creative Tech. I was the Director of Technology for Nonchalance during the The Latitude Society project. I was the Lead Web Developer and then Technical Marketing Engineer at Nebula, which made an OpenStack Appliance. I've been building things on the web and in person since leaving Ohio State University's Electrical and Computer engineering program in 2007. Lots of other really dorky things happened to me before that, like dropping out of high school to go to university, getting an Eagle Scout award, and getting 6th in a state-wide algebra competition. I have an affinity for hopscotch.