Data

PostgreSQL 14 End of Life: How to Migrate With pg_upgrade (2026)

PostgreSQL 14 got its last release on November 12, 2026. Here is a practical pg_upgrade plan, from picking a target version to the post-upgrade checks.

Marcus Oyelaran

Security & DevOps Specialist

Published 8 min read
Fiber optic patch cables plugged into a blue patch panel in a data center
On this page 7 sections

PostgreSQL 14 reached end of life on November 12, 2026, when the project shipped 14.25 as the last release of that branch. Install 14.25 now, then plan a major upgrade to a supported version with pg_upgrade. Run it with --check first, choose a copy mode that matches your rollback needs, and rehearse the run on a clone of production.

The PostgreSQL 14 end of life notice arrived with a heavy security release. The November 12 update fixed 52 vulnerabilities and more than 140 bugs across every supported branch, and version 14 will never get another one. This guide is for DBAs, platform engineers and backend leads who still run 14 in production. It covers what changes, which version to pick, how to run pg_upgrade and what to do if you cannot move this month.

Backtrace covers DevOps, security and data tooling for working engineers, and this piece follows that brief: real commands, real constraints, no sales pitch. Backtrace's editors checked every flag below against the PostgreSQL 19 pg_upgrade documentation.

What does PostgreSQL 14 end of life change for your servers?

It changes who fixes your bugs. The PostgreSQL Global Development Group will no longer ship security or bug fixes for version 14. Any new vulnerability in that code line stays open on your servers unless you patch it yourself or pay a vendor. The database keeps running, but its risk only grows.

Abstract cyber security graphic representing exposure from unpatched database software

The size of the last batch shows why that matters. The project's release announcement rates CVE-2026-6460, a type confusion bug triggered after an ALTER ... SET DATA TYPE command, at 8.8 on the Common Vulnerability Scoring System (CVSS). Its scoring vector requires only low privileges, so an attacker needs a database login first. Another entry, CVE-2026-6467, scores 7.2 and needs high privileges.

A database login is easier to get than it sounds. A SQL injection bug or a leaked application credential can supply one, and the same thinking drives our guide to checking repos for the wfx-loot CI secret stealer. Stolen credentials turn "needs a login" into "needs a phishing email."

The support window itself is policy, not a surprise. The PostgreSQL versioning policy says each major version gets five years of support, followed by a final minor release. After that the software is unsupported. Version 14 simply reached that date.

Which PostgreSQL version should you migrate to?

Pick the newest supported major version that your extensions and drivers have been tested against. For most production teams in late 2026, that means 17 or 18. Version 19 shipped on November 19, 2026, so give it a staging cycle first. Version 15 ends in about a year, which only delays this work.

The table below lists each realistic target with an estimated end of support. The dates are projected from the five-year policy, so check the versioning page for the exact final release before you commit.

Which PostgreSQL version should you migrate to?
Target versionEstimated end of supportBest fit
PostgreSQL 15November 2027Short bridge only; you will migrate again soon
PostgreSQL 16November 2028Teams with extensions not yet certified on 17
PostgreSQL 17November 2029Conservative production default
PostgreSQL 18November 2030Best balance of runway and maturity
PostgreSQL 19November 2031New builds, after a full staging cycle

You do not have to step through each major version. The versioning policy confirms you can jump from one major version to another without installing the ones in between. It also recommends reading the release notes for every version you skip, because behavior changes pile up. The PostgreSQL 19 announcement is a good place to start if you are leaning toward the newest branch.

Whatever you choose, install the latest minor release of that branch, such as 18.7 or 17.12. Otherwise you upgrade straight into the 52 fixes you just read about.

How do you upgrade PostgreSQL 14 with pg_upgrade?

Install the new server binaries, initialize an empty cluster with initdb, and install matching extension files. Then run the new version's pg_upgrade with the old and new data and bin directories. Run it with --check first. Finally, stop both servers, run the real upgrade, start the new cluster and rebuild statistics.

Backlit laptop keyboard where an administrator would run the pg_upgrade commands

The steps below follow the pg_upgrade documentation in order. Treat them as a runbook skeleton and adapt paths to your platform.

  1. Install the new binaries and run initdb with flags compatible with the old cluster. Do not start the new cluster.
  2. Install the new version's extension shared object files. Do not run CREATE EXTENSION, because the old cluster's schema definitions carry over.
  3. Copy any custom full-text search files, such as dictionaries and stop word lists.
  4. Set authentication to peer in pg_hba.conf or use a .pgpass file, because pg_upgrade connects to both servers several times.
  5. Run pg_upgrade --check with your chosen mode flag while the old server is still running.
  6. Stop both servers. Standbys must be running while the primary shuts down so they receive every change.
  7. Run the pg_upgrade binary from the new server, never the old one, with --jobs set near your CPU core count.
  8. Start the new cluster and rebuild statistics, as covered in the post-upgrade section.

A typical dry run looks like this. The paths are examples from a Debian-style layout, so substitute your own.

text
/usr/lib/postgresql/18/bin/pg_upgrade \
  --old-bindir /usr/lib/postgresql/14/bin \
  --new-bindir /usr/lib/postgresql/18/bin \
  --old-datadir /var/lib/postgresql/14/main \
  --new-datadir /var/lib/postgresql/18/main \
  --clone --jobs 8 --check

At Backtrace, we treat --check as a mandatory gate. It can run while the old server is up, so it costs nothing but time. It also lists manual fixes you will need after the upgrade, which makes it the cheapest way to find a surprise.

Extensions deserve a separate review. If you run pgvector, our comparison of Pinecone, Weaviate and pgvector explains where it sits in a data stack. Either way, the extension binaries must match the new server before the upgrade starts.

Use clone mode if your filesystem supports it, and link or swap only if you have a tested restore path. Clone is nearly as fast as link and leaves the old cluster usable. Copy is the safe default, and it is the slowest. Your rollback plan decides the choice.

Portable external hard drive, a stand-in for the full backup taken before a major upgrade
Should you use copy, link, clone or swap mode?
ModeSpeedOld cluster after startSame filesystem required
Copy (default)SlowestUsableNo
CloneNear-instant file transferUsableYes, plus Btrfs, XFS with reflink, or APFS
LinkMuch faster than copyNot usableYes
SwapPossibly fastest with many relationsNot usable once transfer beginsYes

Most of those tradeoffs come straight from the pg_upgrade documentation. Link mode saves time and disk space, but you lose the old cluster once the new one starts. Swap mode removes access even earlier, at the start of the file transfer step.

Take a full backup before any mode, and test restoring it. In link and swap modes that backup is your only rollback, so an untested backup is a gamble. A database that cannot be restored is the worst outcome of an end of life migration.

What should you check after the upgrade?

Start with optimizer statistics, then extensions, then application behavior. The upgraded cluster is online at that point, but queries may plan poorly until statistics catch up. A short checklist keeps the cutover boring, which is the goal of any good migration.

After starting the new cluster, work through this list in order:

  • Run vacuumdb --all --analyze-in-stages --missing-stats-only to build minimal statistics quickly.
  • Run vacuumdb --all --analyze-only so cumulative statistics are current for autovacuum triggers.
  • Run the extension update script that pg_upgrade creates, if it reports one.
  • Restore your normal pg_hba.conf authentication rules.
  • Smoke test the application, replication, backups and monitoring against the new cluster.

The documentation says pg_upgrade restores statistics from the old cluster by default, with a --no-statistics option to skip that. The missing-stats-only pass is still worth running, because it fills any gaps. Use --jobs on both vacuumdb commands to speed them up.

If you landed on an older minor release of your target branch, follow the reindex advice in our guide to the PostgreSQL 18.7 update and its reindex steps. Keep the old cluster until the application has run through a full business cycle. Then retire it.

What if you cannot finish the PostgreSQL 14 migration this month?

Patch to 14.25 today, then shrink the attack surface while you plan. Remove database privileges that application accounts do not need, keep the server off public networks, and watch your provider's support notices. Set a firm migration date, because an unpatched version 14 database grows riskier with every new vulnerability.

Check your hosting provider's published end-of-support date rather than assuming it matches the community's. Managed services and Linux distributions sometimes keep patching older versions on their own schedule. That is a vendor decision, not a PostgreSQL project guarantee, and it can change.

Person writing a migration plan on a whiteboard in an office

Fold the work into a patch window you already trust. Our walkthrough of patching Node.js after the November 2026 security release shows one way to keep a window short and repeatable. The same discipline applies here: a written runbook, a rehearsal and a named owner.

Next steps for teams still on PostgreSQL 14

This week, apply 14.25 and inventory every version 14 instance, including forgotten staging and reporting databases. Next, pick a target, usually 17 or 18, and run pg_upgrade --check against a restored copy of production. Then schedule the cutover with a tested backup and a clear rollback decision.

PostgreSQL 14 end of life is a deadline you can plan for, unlike most security incidents. Teams that start now can finish on their own schedule, without an emergency weekend.

Is PostgreSQL 14 still safe to run after November 2026?
Version 14 no longer receives security or bug fixes, so new vulnerabilities will stay unpatched. Applying 14.25 closes the known issues from the November 12 release. It does not protect you from future ones. Treat 14.25 as a stopgap and set a firm date for a major upgrade.
Can you upgrade from PostgreSQL 14 straight to 18 or 19?
Yes. The PostgreSQL versioning policy says you can move from one major version to another without installing the versions in between. Read the release notes for every version you skip, because behavior changes accumulate. Run pg_upgrade --check against a restored copy of production first to find incompatibilities before the real cutover.
How long does a pg_upgrade take?
It depends on your mode and data size. Copy mode, the default, moves every file and takes the longest. Link mode is much faster, clone mode is near-instant on supported filesystems, and swap mode may be fastest with many relations. Rehearse on a restored copy of production to get a real number for your window.
Does pg_upgrade keep optimizer statistics?
By default it restores statistics from the old cluster, and a --no-statistics option skips that step. Even so, run vacuumdb --all --analyze-in-stages --missing-stats-only after the upgrade to fill any gaps. Then run vacuumdb --all --analyze-only so cumulative statistics are current for autovacuum triggers.

Written by

Marcus Oyelaran

Security & DevOps Specialist

11+ years experience

Marcus Oyelaran spent eleven years moving between platform and security teams, including four years as a security engineer embedded inside a DevOps org at a healthcare SaaS company handling PHI at scale. He's run more incident postmortems than he can count, and most of what he writes for Backtrace comes directly out of those postmortems: the secret that leaked through a build log, the IAM policy that was too permissive by one wildcard, the deploy that skipped a gate because someone was in a hurry. He holds an OSCP and spends an unreasonable amount of time arguing about supply chain security on internal Slack channels.

Credentials

  • OSCP (Offensive Security Certified Professional)
  • 11 years in DevOps and security engineering
  • Former security engineer, healthcare SaaS platform (HIPAA-regulated infrastructure)