Updating PostgreSQL 14 to 14.25 on the USS Gateway (Ubuntu 22.04)
The USS Gateway is built on Ubuntu 22.04 LTS, which remains in standard support until May 2027. However, individual packages within the operating system have their own end-of-life (EOL) dates, and PostgreSQL 14 has now reached upstream EOL.
PostgreSQL 14.25 is the final release of version 14 and contains the last upstream fixes. Ubuntu's own repositories do not carry this build, so to install it you need to add the official PostgreSQL (PGDG) Ubuntu repository, which still publishes updates for 22.04. This article explains how to do that and how to confirm the update.
Risk Assessment
Before scheduling the update, note that:
- The PostgreSQL port on the USS Gateway only listens on localhost. Exploiting any PostgreSQL vulnerability would require an attacker to already have access to the Gateway server itself.
- PostgreSQL 14 reached end of life upstream on 12 November 2026. 14.25 is the final release of version 14 and includes fixes for 52 security vulnerabilities, so Gateways on earlier 14.x builds are missing those fixes.
- At the time of writing, there are no published vulnerabilities affecting PostgreSQL 14.25. However, as version 14 is no longer supported upstream, any vulnerabilities discovered from now on will not be fixed in version 14.
Because PostgreSQL is only reachable locally on the Gateway, the update can be scheduled into a normal maintenance window. The long-term fix is the Ubuntu 24.04 USS Gateway image described below.
Before You Start
- Take a backup or VM snapshot of the USS Gateway before making any changes, so you can roll back if needed.
- You need root (sudo) access to the USS Gateway Command Line, and outbound HTTPS access to
www.postgresql.organdapt.postgresql.org. - This is a minor version update within PostgreSQL 14. No dump/restore or data migration is needed; the existing database is used as-is.
Step-by-Step Guide
Step 1: Switch to root
Log in to the USS Gateway Command Line and switch to root:
sudo su
Step 2: Add the PostgreSQL repository signing key
install -d -m 0755 /usr/share/postgresql-common/pgdg
curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc -o /usr/share/postgresql-common/pgdg/apt.postgresql.org.asc
Step 3: Add the PostgreSQL (PGDG) repository
Copy and paste the whole block below in one go. It creates the repository definition file:
cat > /etc/apt/sources.list.d/pgdg.sources <<'EOF'
Types: deb
URIs: https://apt.postgresql.org/pub/repos/apt
Suites: jammy-pgdg
Components: main
Architectures: amd64
Signed-By: /usr/share/postgresql-common/pgdg/apt.postgresql.org.asc
EOF
Step 4: Refresh the package lists
apt update
Step 5: Install PostgreSQL 14.25
Install the specific 14.25 build by pinning the version:
apt-get install postgresql-14=14.25-1.pgdg22.04+1
Follow any prompts, accepting the defaults. PostgreSQL will be restarted as part of the install.
Step 5: Reboot the GW
reboot
Verifying the Update
- Confirm the 14.25 package is installed:
dpkg -l | grep postgresql-14
The output should include:ii postgresql-14 14.25-1.pgdg22.04+1
- Confirm PostgreSQL is running:
systemctl status postgresql
- Confirm the USS Gateway is operating normally, e.g. traffic is being filtered and logs are being written.
Ubuntu 24.04 USS Gateway Image
TrustLayer will release an Ubuntu 24.04 USS Gateway image in due course, as Ubuntu 22.04 approaches the end of its LTS window. That image will move the USS Gateway onto a currently supported operating system and PostgreSQL version.
Notes
- Upgrading to PostgreSQL 18: Once 14.25 is installed, you can move the USS Gateway onto PostgreSQL 18, which is currently supported, without waiting for the Ubuntu 24.04 image. See Upgrading the USS Gateway from PostgreSQL 14 to PostgreSQL 18 (Ubuntu 22.04).
- PostgreSQL 14.25 is the final release of version 14 and is not supported upstream. It will receive no further security or bug fixes.
- Reference: PostgreSQL: Linux downloads (Ubuntu)