Skip to content
Mohammad Awadallah
All posts

PostgreSQL 14 is end of life: planning an upgrade without surprises

PostgreSQL 14 got its final update on November 12, 2026. Your database won't stop, but it won't get fixes anymore. A practical guide to picking a target version, an upgrade method, and a test plan before you touch production.

6 min readAlso in:العربيةFrançais

On November 12, 2026, the PostgreSQL project shipped an update for every supported version, including 14.25. The announcement is explicit: this is the final release of PostgreSQL 14, and it will no longer receive security or bug fixes. The same update brought the second release candidate of PostgreSQL 19 (19 RC 2), with general availability planned for November 19, 2026.

If you have a database on 14, this is the time to plan, not to panic.

What “end of life” actually means

Your database won’t stop tomorrow. The server keeps running and your data stays where it is. What stops is the fixes: any security hole or bug found from now on will not be fixed in 14.

The project’s policy is simple: each major version is supported for five years from its first release, then gets one final minor release and is retired. PostgreSQL 14 first shipped on September 30, 2021, so its time is up.

First things first: if you’re not on 14.25 yet, update to it. A minor update needs no dump and restore — stop the server, install the new binaries, restart. The November 12 announcement lists extra steps for some cases, such as reindexing certain kinds of indexes, so read it before you update.

Don’t jump to 19 on day one

At the time of writing, 19 is still a release candidate, with GA planned for November 19 unless an issue forces a delay. Even after release, a new major version hasn’t had a year of wide use yet, and the extensions you depend on may not ship compatible builds right away.

The PostgreSQL 19 release notes (still a draft) list changes worth reading, among them: RADIUS support removed, JIT disabled by default, and the default max_locks_per_transaction raised from 64 to 128. Nothing dramatic, but it means moving to 19 takes reading and testing, not just changing a number.

18 or 19?

PostgreSQL 18 shipped on September 25, 2025, is now at 18.7, and is supported until November 14, 2030. It has seven minor releases behind it and four years of support ahead.

19 would buy you roughly one extra year of support under the five-year policy, but it’s brand new.

For most cases, the sensible choice is to move to 18 now, and plan for 19 after a few minor releases, once you’ve confirmed every extension you use supports it. If an upgrade is a big project for you that you don’t want to repeat soon, and you have time to test, waiting for 19.1 or 19.2 is a reasonable choice.

Avoid upgrading to 15: its support ends on November 11, 2027, so you’d be doing all of this again in a year. Jumping straight from 14 to 18 is allowed, but the project’s docs advise reading the release notes of every major version in between.

Three ways to upgrade

1. Dump and restore (pg_dumpall, then psql). The simplest and most transparent: dump everything from the old server and load it into the new one. But it’s slow, and downtime grows with your data. Good for small databases. The docs recommend using pg_dump and pg_dumpall from the newer version.

2. pg_upgrade. Moves the data into a new cluster without rewriting it through SQL. The docs say an upgrade can take minutes, especially with --link. The catch: with --link, once you start the new cluster the old one is no longer usable, and going back means restoring from backup. Safer alternatives are --clone if your filesystem supports it, or plain copy, which is the default.

3. Logical replication. You run the new version next to the old one, stream changes into it continuously, then switch the application over. The docs say the switchover costs only several seconds of downtime. The price is complexity: schema and DDL are not replicated, sequence values are not replicated and must be set by hand before the switch, and large objects are not replicated at all.

In practice: for a small database, dump and restore. For a medium or large one that can afford minutes of downtime, pg_upgrade. Logical replication only when seconds really matter.

If you run it in Docker

The official image does not upgrade the data directory across major versions. If you change postgres:14 to postgres:18 on the same directory, the server won’t start. This has been an open issue in the image’s repository since 2014; the reason is that pg_upgrade needs both versions’ binaries at once, and the image ships only one.

Watch the latest tag too: it currently points to 18. If it moves to 19 after release, any service using it will try to start a new major version on old data. Always pin the major version in your Compose file.

You have two options:

  • Dump and restore between two containers: start a fresh 18 container on an empty directory and dump the old one into it.
  • A dedicated pg_upgrade container: for example tianon/docker-postgres-upgrade, which bundles both versions. Its author calls it a proof of concept, so test it on a copy first.

Something else changed in the image starting with 18: the default data path is now /var/lib/postgresql/18/docker and the declared volume is /var/lib/postgresql, while 17 and earlier mount at /var/lib/postgresql/data. Check the mount paths in your Compose file before you start.

A short test plan

  1. Restore a copy. Take a recent backup and restore it on a test server or container. Don’t experiment on production.

  2. Prepare the new cluster. PostgreSQL 18 enables data checksums by default at initdb, and pg_upgrade requires both clusters to match. Check with SHOW data_checksums; on the old one; if it’s off, create the new cluster with --no-data-checksums.

  3. Install extensions for the new version. Every extension you use must have its files installed for the new version before the upgrade. Don’t run CREATE EXTENSION in the new cluster; pg_upgrade carries the definitions over from the old one.

  4. Run --check with the same mode you’ll use:

pg_upgrade \
  --old-bindir /usr/lib/postgresql/14/bin \
  --new-bindir /usr/lib/postgresql/18/bin \
  --old-datadir /path/to/pg14/data \
  --new-datadir /path/to/pg18/data \
  --link --check

It can run while the old server is up, and it changes no data. If you’ll use --link or --clone, pass it together with --check so the mode-specific checks run.

  1. Run the application’s tests against the upgraded copy, not against an empty database.

  2. Measure downtime. Time it from stopping the old server until the application runs on the new one. That number is what you plan the maintenance window with.

  3. Keep the old cluster until you’re sure. Don’t delete the old cluster or its backup until the new one has run cleanly for a few days.

After the upgrade

Since PostgreSQL 18, pg_upgrade carries over most optimizer statistics from the old cluster, except extended statistics. The docs still recommend two steps afterwards:

vacuumdb --all --analyze-in-stages --missing-stats-only
vacuumdb --all --analyze-only

The first quickly generates minimal statistics where they’re missing; the second refreshes the cumulative statistics that autovacuum relies on. And if pg_upgrade reports that extension updates are available, it creates a script for you to run afterwards.

The takeaway

End of life is not an outage, it’s a deadline. The plan: update to 14.25 now, pick 18 as the target in most cases, choose the upgrade method by database size and how much downtime you can take, and rehearse everything on a copy before production. The old cluster goes only after the new one has proven itself.