Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save alextakitani/e8d5cc4be339d19c4829cb5eaf419ddf to your computer and use it in GitHub Desktop.
Save alextakitani/e8d5cc4be339d19c4829cb5eaf419ddf to your computer and use it in GitHub Desktop.
Upgrading PostgreSQL from 10 to 11 on Ubuntu 18.04

TL;DR

sudo apt-get install -y postgresql-12 postgresql-server-dev-12 postgresql-contrib-12 libpq-dev postgresql-12-hypopg
sudo pg_dropcluster 12 main --stop
sudo pg_upgradecluster 11 main
sudo pg_dropcluster 11 main
@halovivek
Copy link

Thank you so much. I just updated my postgresql from 10 to 12 without losing the data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment