Upgrade to PostgreSQL 13

Upgrading to PG13 on Ubuntu/Debian

I use a lot of Ubuntu or Debian Linux systems mainly because I like their wrapper scripts for managing multiple versions of PostgreSQL.

This is a weird use case rather than something I expect people to worry about.

You can run Postgres on any Linux distribution if you’re willing to put the work into securing it.

PostgreSQL gives a simple guide to upgrading to new versions . It really was just 4 lines on my Ubuntu 20.04 system:

$ sudo 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 | sudo apt-key add -
$ sudo apt-get update
$ sudo apt-get -y install postgresql-13 postgresql-doc-13

Migration to Version 13