PostgreSQL 14 reaches end of life in November 2026: upgrading with pg_upgrade
PostgreSQL 14 gets its final release in November 2026. A practical plan for moving to PostgreSQL 17 with pg_upgrade, and when logical replication is the better route.
The PostgreSQL project supports each major version for five years. PostgreSQL 14 was released in 2021, so its final minor release is due in November 2026. After that there are no more fixes, security or otherwise. PostgreSQL 13 already reached end of life in November 2025.
Which version to move to
Go to the newest version your extensions and tooling support, usually PostgreSQL 17 or 18. Each major version is supported for five years from its release, so a newer target buys you more time before the next upgrade.
Option 1: pg_upgrade (minutes of downtime)
pg_upgrade converts the old cluster's catalogs for the new version and reuses the data files. With --link it uses hard links instead of copying, so even large databases upgrade in minutes.
- Install the new version next to the old one, including the same extensions (PostGIS, pg_stat_statements and so on) built for the new version.
- Take a backup and make sure it restores.
- Initialise the new cluster with the same locale and encoding settings as the old one.
- Check first:
pg_upgrade --old-bindir=/usr/lib/postgresql/14/bin --new-bindir=/usr/lib/postgresql/17/bin \
--old-datadir=/var/lib/postgresql/14/main --new-datadir=/var/lib/postgresql/17/main \
--link --check
- Fix whatever it reports, stop the old server, and run the same command without
--check. - Start the new server and rebuild planner statistics, which pg_upgrade doesn't carry over:
vacuumdb --all --analyze-in-stages
- Copy over your settings from the old postgresql.conf and pg_hba.conf, review them, and update connection strings or ports if they changed.
About --link: once the new cluster has started, the old one shares its data files and must not be started again. Your rollback from that point is the backup. Without --link, pg_upgrade copies the data (slower, needs double the disk) and the old cluster stays usable.
Option 2: logical replication (near-zero downtime)
For databases that can't stop for even a few minutes, build a new server on the new version, replicate into it with logical replication (CREATE PUBLICATION / CREATE SUBSCRIPTION), let it catch up, then switch the application over. It takes more preparation: every replicated table needs a primary key or replica identity, sequences and schema changes aren't replicated automatically, and you need to plan the cut-over.
Things to check before either route
- Extensions: list them with
SELECT * FROM pg_extension;in every database and confirm each exists for the target version. - Replication slots: pg_upgrade can carry logical slots over only when upgrading from PostgreSQL 17 or later. On older versions, drop them and recreate them afterwards.
- Prepared transactions must be resolved first.
- Password hashing: if you still use md5, move to SCRAM. MD5 password authentication is deprecated in PostgreSQL 18.
- Removed features: read the release notes for every version you're skipping, not just the target.
SQLNirvana's Upgrade tab checks your server against these points (extensions, slots, replicas, password hashing, prepared transactions) and lists the steps for your exact versions. The free PostgreSQL check includes a summary.