Upgrade PostgreSQL from 17 to 18 on Ubuntu 26.04

Upgrade PostgreSQL from 17 to 18 on Ubuntu 26.04

Articles

After moving to Ubuntu 26.04, upgrade an existing 17/main cluster to 18 by running pg_upgradecluster 17 main -v 18, then verify the new 18/main cluster is online. Once confirmed, drop the old 17 cluster with pg_dropcluster 17 main and optionally purge postgresql-17 and postgresql-client-17 packages.