Created
May 29, 2017 20:05
-
-
Save svenkrb/a77d849876e9b62805b8eb208041126b to your computer and use it in GitHub Desktop.
Upgrade postgresql a cluster Ubuntu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # As root | |
| # Add pg repo if not already established | |
| sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' | |
| wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - | |
| apt update | |
| # Tweak needed packages | |
| apt install postgresql-9.6 postgresql-client-9.6 postgresql-contrib-9.6 postgresql-plpython3-9.6 postgresql-server-dev-9.6 postgresql-9.6-plr postgresql-9.6-mysql-fdw | |
| pg_dropcluster 9.6 main --stop | |
| pg_upgradecluster -m upgrade 9.5 main | |
| pg_dropcluster 9.5 main |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment