PostgreSQL 14 got its last release on 12 November 2026. Eight days later the official Docker image moved latest to 19. If you still run 14 you'll probably pick 18 or 19 next, and if you run it in Docker, a bot may already have opened that PR for you.
I wanted to see what goes wrong on that path, so I did the upgrade on a scratch machine: two vCPUs, the PGDG Debian packages for 14.24 and 18.6 unpacked without root, and a generated shop database with 200,000 customers, 12 million orders, a trigram index, one CREATE STATISTICS object, a role with an MD5 password and an unlogged partitioned table. On disk that came to 1,791 MB, and loading it took 134.8 seconds. Then I ran a small checker against 20 real repos that had an open Renovate PR moving Postgres to 18 on 13 November.
Everything below comes from those runs. The scripts and the full transcripts are in the repo linked at the end.
pg_upgrade --check fails on the first real check
I made an 18 cluster with plain initdb, the way most people and most images do, and ran pg_upgrade --check. It printed one "ok" and stopped:
Checking cluster versions ok old cluster does not use data checksums but the new one does Failure, exiting The release notes list this first among the incompatibilities: initdb in 18 turns data checksums on by default. My 14 cluster had defaults, so pg_controldata showed checksum version 0. The new one showed 1, and pg_upgrade needs them to match.
You can create the 18 cluster with initdb --no-data-checksums (in the Docker image, POSTGRES_INITDB_ARGS=--no-data-checksums), or stop the old cluster and run pg_checksums --enable on it. The second option rewrites every page, so on a big database it costs real downtime. I took the first. SHOW data_checksums; on the old server tells you which case you are in.
A dump and restore doesn't care. The cluster I restored into had checksums on and nothing complained.
The upgrade itself was the fast part
With --no-data-checksums, --check passed and pg_upgrade --link finished in 2.9 seconds for the whole 1.8 GB. Link mode hard-links the data files instead of copying them.
For comparison I rebuilt the same orders and customers tables on a fresh 14 and piped pg_dumpall into psql on an 18 server. That took 71.2 seconds, and the only error was the harmless role "postgres" already exists. The gap grows with size, because dump/restore rewrites every row and rebuilds every index.
The price of --link is printed in its own output: once the new cluster has started, the old one can't be safely started again. Take the backup before.
Statistics mostly come along now
In 18, pg_upgrade copies planner statistics. Before I ran anything on the new server, pg_stats already had 6 rows for the 6 columns of orders.
Extended statistics don't come along, and the release notes say so. My CREATE STATISTICS object on customers (city, country) survived as a definition, but pg_stats_ext was empty, and the plans showed it. In my data the city decides the country, so WHERE city = 'city-1' AND country = 'country-1' matches 400 rows. Right after the upgrade the planner estimated 8. After vacuumdb --all --analyze-in-stages --missing-stats-only, which took 0.4 seconds because it only fills in what's missing, the estimate was 398. pg_upgrade's closing message suggests that command too. I'd run it right after starting the new server, since an estimate 50 times too low can turn a hash join into a nested loop.
Two smaller things came over quietly. The MD5 role kept its hash, and setting a new MD5 password on 18 prints WARNING: setting an MD5-encrypted password. The unlogged partitioned table came out as a plain one (relpersistence went from u to p), and 18 refuses CREATE UNLOGGED TABLE ... PARTITION BY, so a migration that creates one will fail on fresh installs.
All of this is in one read-only SQL file you can run on the old cluster first: checksum state, MD5 roles, extended statistics with the ANALYZE to run afterwards, extensions and versions, and a few more.
The Docker part, where most people will meet this
Most small projects don't run pg_upgrade. They have a compose file like this, and a bot changes postgres:17 to postgres:18:
services: db: image: postgres:18 volumes: - pgdata:/var/lib/postgresql/data From 18 on, the official image keeps its data in /var/lib/postgresql/18/docker and declares the volume at /var/lib/postgresql (docker-library/postgres#1259), so that two majors can sit in one volume for pg_upgrade --link. I ran the 18 image's entrypoint script against that compose file with its paths remapped. With a mount at /var/lib/postgresql/data it stops before initdb with a long message that starts "Error: in 18+, these Docker images are configured to store database data in a format which is compatible with pg_ctlcluster". It does that even when the volume is empty. The data is safe, but the database never starts.
Setting PGDATA=/var/lib/postgresql/data gets you past that check, and then you hit the other problem: a server can't open another major's files. I made a cluster with 17.12 and started 18.7 on it:
FATAL: database files are incompatible with server DETAIL: The data directory was initialized by PostgreSQL version 17, which is not compatible with this version 18.7 (Debian 18.7-1.pgdg12+2). It fails the same way going down. One project's new release pinned postgres:15 while its users' volumes held 17 data, and a 15.20 server on such a directory printed the same FATAL, this time naming 17 and 15.20. On a volume that already holds data you need a dump and restore or a pg_upgrade step. The plain dump works: I dumped a 16.16 server with pg_dumpall, restored into a fresh 18.7, got the two expected "already exists" errors for the role and database the image creates, and all 1,000 sample rows came back.
What 20 Renovate PRs would have done
GitHub's title search for "Update postgres Docker tag to v18" also matches patch bumps: on 13 November, 95 of the newest 100 open hits were to v18.7. So I filtered for the exact major-bump title and took the newest 20 repos with one open. For each I downloaded the base and the PR head and ran the checker with --base, the way a reviewer would look at the diff.
- 15 of the 20 repos (18 Postgres services) move a persistent volume to 18 with no dump or upgrade step anywhere near it. Twelve of those services were on 17, four on 16, one on 15 and one on 14.
- In 12 of those repos (13 services) the volume is still at
/var/lib/postgresql/datawith noPGDATA, so the container stops at the entrypoint check. Two of the 13 are Helm charts. - The other 5 services set
PGDATAthemselves, so they pass the entrypoint and then meet the old major's files. - None of the 18 sets
--data-checksumsor--no-data-checksums, so anyone who tries pg_upgrade later starts at the checksum error above. - The 5 clean repos only bumped a CI service container, a test database with no volume, or an image name inside a shell script the checker doesn't read.
Statistics can't be seen from a repo at all. That part lives in the SQL file.
My first pass missed two of them. One chart set the image in values.yaml and mounted the old path in templates/statefulset.yaml, which the checker had listed as unreadable YAML. A Kubernetes Deployment ran Postgres as a native sidecar (an initContainers entry with restartPolicy: Always), which it didn't look at. Both are fixed and have tests now, and the numbers above are from the fixed version.
That was the state on 13 November. By 21 November, Renovate had autoclosed 14 of those 20 PRs, all on 20 or 21 November, the day the 19 image appeared. At least 4 of those repos already have a "to v19" PR open, so the jump got bigger, not smaller. The other 6 are still open.
The fix itself is usually small. I sent one as a pull request with the entrypoint run as proof, and the maintainers merged it: RhinoLink-Tech/data-fabric#547 moved a postgres:18 sample volume from /var/lib/postgresql/data to /var/lib/postgresql.
Then postgres:19 shipped
The image went up on 20 November, and by the next morning GitHub search showed about 1,230 pull requests for "Update postgres Docker tag to v19" (a few hits are unrelated Renovate onboarding PRs). If you followed the 18 advice and mounted the volume at /var/lib/postgresql, you might expect the bump to be harmless. It isn't, but at least it fails loudly.
I ran the 19 image's entrypoint (same remapped-paths trick as before) on a volume that holds an 18 cluster in /var/lib/postgresql/18/docker. It looks in /var/lib/postgresql/*/docker, finds the 18 data, prints the same "Error: in 18+, these Docker images are configured..." message, now naming /var/lib/postgresql/18/docker, and exits 1 before initdb. It doesn't start an empty 19 next to your data. That's good, but your app is still down until you migrate.
This is the case the new layout was built for: both majors sit in one volume, so pg_upgrade --link works without crossing a mount. tianon/postgres-upgrade already has an 18-to-19 tag. pgautoupgrade/pgautoupgrade had no 19 tag yet when I checked on 21 November.
The checksum problem doesn't apply here. A cluster that 18 created with defaults already has checksums on, same as 19. If you go straight from 17 or older to 19, it does.
I updated the checker for this: latest now counts as 19, an 18 to 19 bump on the new layout reports the entrypoint exit instead of the FATAL, and it no longer warns about checksums when the old cluster came from 18. There's a test for each, and the entrypoint run is in the repo.
The checker
pg18-upgrade-check is a small offline Node CLI. It reads compose files, Kubernetes manifests, Helm values and chart templates, GitHub Actions services and Dockerfiles, and reports each case with file, line and two fixes: pin PGDATA to the old path, or move the mount and migrate the data. It stays quiet on CI service containers, which start empty every run, and on init-script bind mounts. It exits non-zero on errors, so it can run in CI on the bot's branch.
The repo also has the SQL preflight, the script that fetches the 14 and 18 binaries without root, the upgrade script and the transcripts: https://github.com/atokim4/pg18-upgrade-check
Before merging one of these PRs, check where the volume is mounted and whether it already holds data.
I wrote this with help from AI tools. The upgrade runs, the entrypoint runs, the Renovate scan and every number above come from the scripts in the repo, which I ran myself.

