Skip to content

Instantly share code, notes, and snippets.

@iangow
Forked from anonymous/pg_upgrade.md
Created October 19, 2017 13:03
Show Gist options
  • Save iangow/e96fa6091945aa24507d4110692ae193 to your computer and use it in GitHub Desktop.
Save iangow/e96fa6091945aa24507d4110692ae193 to your computer and use it in GitHub Desktop.
Upgrade to PostgreSQL 10 on Ubuntu

Install packages

sudo apt install postgresql-10 postgresql-plpython-10 postgresql-plperl-10 libpq-dev

Install PL/R

If you have PL/R functions in your existing database, then this is necessary:

git clone https://github.com/postgres-plr/plr
cd plr
USE_PGXS=1 make
sudo USE_PGXS=1 make install

Shut down servers

sudo pg_ctlcluster 10 main stop
sudo pg_ctlcluster 9.6 main stop

Run pg_upgrade

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