Skip to content

Upgrade ubuntu version to 22.04

Tianwen Chen requested to merge upgrade-to-pg-14 into master

Since our production database is already on PosgreSQL 14, this MR is to upgrade Ubuntu to 22.04 which supports PosgreSQL 14 by default.

If we stay on 20.04, the PosgreSQL version supported by default is 12, and it will break the migrations that's related to table partitioning which PG 12 doesn't support.

See the following output that the PosgreSQL that Ubuntu 22.04 supports by default:

➜ docker-testing main ✓ docker run --rm -it --entrypoint bash docker-testing
root@15b1434d2535:/# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.3 LTS"
root@15b1434d2535:/# apt update
Get:1 http://ports.ubuntu.com/ubuntu-ports jammy InRelease [270 kB]
Get:2 http://ports.ubuntu.com/ubuntu-ports jammy-updates InRelease [119 kB]
Get:3 http://ports.ubuntu.com/ubuntu-ports jammy-backports InRelease [109 kB]
Get:4 http://ports.ubuntu.com/ubuntu-ports jammy-security InRelease [110 kB]
Get:5 http://ports.ubuntu.com/ubuntu-ports jammy/multiverse arm64 Packages [224 kB]
Get:6 http://ports.ubuntu.com/ubuntu-ports jammy/restricted arm64 Packages [24.2 kB]
Get:7 http://ports.ubuntu.com/ubuntu-ports jammy/main arm64 Packages [1758 kB]
Get:8 http://ports.ubuntu.com/ubuntu-ports jammy/universe arm64 Packages [17.2 MB]
Get:9 http://ports.ubuntu.com/ubuntu-ports jammy-updates/main arm64 Packages [1081 kB]
Get:10 http://ports.ubuntu.com/ubuntu-ports jammy-updates/restricted arm64 Packages [665 kB]
Get:11 http://ports.ubuntu.com/ubuntu-ports jammy-updates/universe arm64 Packages [1135 kB]
Get:12 http://ports.ubuntu.com/ubuntu-ports jammy-updates/multiverse arm64 Packages [27.8 kB]
Get:13 http://ports.ubuntu.com/ubuntu-ports jammy-backports/main arm64 Packages [49.9 kB]
Get:14 http://ports.ubuntu.com/ubuntu-ports jammy-backports/universe arm64 Packages [26.2 kB]
Get:15 http://ports.ubuntu.com/ubuntu-ports jammy-security/main arm64 Packages [811 kB]
Get:16 http://ports.ubuntu.com/ubuntu-ports jammy-security/restricted arm64 Packages [651 kB]
Get:17 http://ports.ubuntu.com/ubuntu-ports jammy-security/multiverse arm64 Packages [23.4 kB]
Get:18 http://ports.ubuntu.com/ubuntu-ports jammy-security/universe arm64 Packages [879 kB]
Fetched 25.2 MB in 27s (941 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
root@15b1434d2535:/# apt show postgresql-12
N: Unable to locate package postgresql-12
N: Unable to locate package postgresql-12
E: No packages found
root@15b1434d2535:/# apt show postgresql-13
N: Unable to locate package postgresql-13
N: Unable to locate package postgresql-13
E: No packages found
root@15b1434d2535:/# apt show postgresql-14
Package: postgresql-14
Version: 14.9-0ubuntu0.22.04.1
Priority: optional
Section: database
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Debian PostgreSQL Maintainers <team+postgresql@tracker.debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 43.5 MB
Provides: postgresql-14-jit-llvm (= 14), postgresql-contrib-14
Depends: locales | locales-all, postgresql-client-14, postgresql-common (>= 229~), ssl-cert, tzdata, debconf (>= 0.5) | debconf-2.0, libc6 (>= 2.34), libgcc-s1 (>= 3.3.1), libgssapi-krb5-2 (>= 1.14+dfsg), libicu70 (>= 70.1-1~), libldap-2.5-0 (>= 2.5.4), libllvm14, liblz4-1 (>= 0.0~r130), libpam0g (>= 0.99.7.1), libpq5 (>= 14~~), libselinux1 (>= 3.1~), libssl3 (>= 3.0.0~~alpha1), libstdc++6 (>= 11), libsystemd0, libuuid1 (>= 2.16), libxml2 (>= 2.7.4), libxslt1.1 (>= 1.1.25), zlib1g (>= 1:1.1.4)
Recommends: sysstat
Homepage: http://www.postgresql.org/
Task: postgresql-server
Postgresql-Catversion: 202107181
Download-Size: 15.9 MB
APT-Sources: http://ports.ubuntu.com/ubuntu-ports jammy-updates/main arm64 Packages
Description: The World's Most Advanced Open Source Relational Database

N: There is 1 additional record. Please use the '-a' switch to see it
Edited by Tianwen Chen

Merge request reports