If your compose file says image: postgres:latest, then as of November 20 it says PostgreSQL 19. The Docker Hub tag list now has 19.0, 19 and latest on the same line. The image keeps its data under a version-numbered path (/var/lib/postgresql/19/docker), so after the next docker compose pull && docker compose up -d the entrypoint finds your 17 or 18 data somewhere else, prints Error: in 18+, these Docker images are configured to store database data in a format which is compatible with "pg_ctlcluster" and exits. Your data is safe, but your database is down until you upgrade it or pin the old tag.

That's the small problem, because at least it's loud. The bigger one is that the PostgreSQL 19 release notes list 22 items under "Migration to Version 19", and a few of them change query results without raising a single error. Running pg_upgrade is the easy bit. What follows is the breaking changes sorted by how much they hurt, a pre-upgrade check you can paste, the pg_upgrade and Docker steps, and when RDS and Cloud SQL will actually let you upgrade.

What's new in PostgreSQL 19, briefly

From the official announcement:

  • REPACK and REPACK (CONCURRENTLY) reclaim bloat "without blocking reads or writes". VACUUM FULL and CLUSTER stay around for compatibility.
  • pg_plan_advice and pg_stash_advice let you pin a plan by query identifier "without changing your application". For anyone who's been jealous of Oracle hints, this is about as close as stock Postgres has come.
  • Autovacuum can vacuum indexes in parallel (autovacuum_max_parallel_workers) and chooses which tables to handle first with a new scoring system, which you can watch in pg_stat_autovacuum_scores.
  • Logical replication no longer needs a restart to switch on: 19 raises the effective WAL level to logical by itself when you create the first logical slot (check effective_wal_level). Sequences replicate too (FOR ALL SEQUENCES).
  • WAIT FOR LSN gives you read-your-writes consistency on standbys. On Lobsters, yorickpeterse described how GitLab's database load balancer does something similar itself, by comparing WAL positions between primary and secondary, and said having it in core "would probably make that entire implementation a lot simpler."
  • INSERT ... ON CONFLICT DO SELECT, COPY to JSON, and IGNORE NULLS for lag(), lead(), first_value(), last_value() and nth_value().

The only performance number the announcement gives: faster foreign key checks "made bulk inserts nearly 2x faster" in testing. It doesn't publish the benchmark, so expect your results to differ.

PostgreSQL 19 breaking changes, sorted by how much they'll hurt

I grouped the 22 items by what happens to you, since the release notes don't order them by impact. A few minor ones (the COPY FROM ... WHERE system-column ban, psql's \crosstabview now honoring \pset null, the new password expiration warning, the MD5 login warning) are left out of the table.

Change What happens
io_workers removed (replaced by io_min_workers, io_max_workers, io_worker_idle_timeout, io_worker_launch_interval) An old setting left in postgresql.conf is now an unknown parameter
escape_string_warning removed, standard_conforming_strings forced on Same config problem. Dumps made by pre-19 pg_dump with the setting off "will not properly load"
JIT disabled by default Big analytical queries that relied on JIT may get slower with no warning
max_locks_per_transaction default 64 → 128, lock allocation changed If you set it yourself, double your value to get the same capacity
btree_gist inet/cidr opclasses pg_upgrade refuses the cluster until those indexes are gone
CR/LF in database, role or tablespace names pg_upgrade refuses the cluster
MULE_INTERNAL encoding removed Dump and restore into a different encoding
RADIUS auth removed Logins through pg_hba.conf RADIUS lines stop working
A json_array() call that returns no rows now gives [] instead of NULL Your IS NULL checks quietly stop matching
FTS and pg_trgm use the database's locale provider On ICU/builtin databases, search results can change. Reindex and recompute stored tsvector
fuzzystrmatch soundex(), metaphone(), difference(), dmetaphone() change on non-ASCII Reindex anything built on them
READ ONLY now propagates to postgres_fdw Read-only transactions can no longer write through the FDW
Parallel vacuum shares one cost limit Parallel VACUUM "might run slower"
sync_error_count → sync_table_error_count, wait event type BUFFERPIN → BUFFER, BufferPin → BufferCleanup, BufferContent split into three new events Your monitoring dashboards break
get_relation_info_hook removed, IndexAm handlers now static Extension authors have to ship new builds

The ones I'd worry about are json_array() and the FTS/pg_trgm change, plus fuzzystrmatch if you have non-ASCII names. Most of the rest either fails loudly or shows up on a dashboard, while these hand back different data and nothing errors. If you're on an ICU database with LC_CTYPE set to C, which is a pretty common setup, budget time for the reindex.

Two default changes didn't make it into the Migration section but are worth knowing: log_lock_waits is now on, and default_toast_compression is now lz4 where the build supports it.

Pre-upgrade checklist: a five-minute grep

# settings that no longer exist (ALTER SYSTEM writes to postgresql.auto.conf) grep -nE '^\s*(io_workers|escape_string_warning)\b' postgresql.conf postgresql.auto.conf grep -n radius pg_hba.conf 
-- btree_gist inet/cidr indexes (pg_upgrade will reject these) SELECT indexrelid::regclass, opcname FROM pg_index i JOIN pg_opclass o ON o.oid = ANY(i.indclass) WHERE opcname IN ('gist_inet_ops', 'gist_cidr_ops'); -- anyone still on md5? 19 warns after every md5 login SELECT rolname FROM pg_authid WHERE rolpassword LIKE 'md5%'; 

How to upgrade to PostgreSQL 19 with pg_upgrade

The pg_upgrade docs support sources from 9.2 onward, so 17 and 18 are both fine. Always run --check first. It can run while the old server is still up (use a different port for the new one), and if you pass your transfer mode along with it, you get that mode's checks as well.

/usr/lib/postgresql/19/bin/pg_upgrade \ --old-bindir /usr/lib/postgresql/18/bin \ --new-bindir /usr/lib/postgresql/19/bin \ --old-datadir /var/lib/postgresql/18/main \ --new-datadir /var/lib/postgresql/19/main \ --jobs "$(nproc)" --link --check 

Choosing a transfer mode:

  • --link: hard links, fast. Both directories must be on the same filesystem, and once 19 has started you can't go back to the old cluster.
  • --clone: as fast as link, and the old cluster is left untouched. Needs Btrfs or reflink XFS on Linux 4.5+, or APFS on macOS.
  • --swap: per the docs this "can outperform" every other mode, especially on clusters with many relations, but it modifies the old cluster destructively once file transfer starts.

Most optimizer statistics come across now. The docs still tell you to run these afterwards:

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

Then reindex your FTS, pg_trgm and fuzzystrmatch indexes. On slots: from a 17+ source only logical slots come across, so plan to recreate physical slots by hand (the docs spell this out for standbys).

Upgrading the Docker postgres image from 17 or 18 to 19

Starting with 18, the official image puts PGDATA at /var/lib/postgresql/<major>/docker and declares the VOLUME as /var/lib/postgresql (Docker Hub). This was done on purpose, so that a mount of /var/lib/postgresql can hold both versions and pg_upgrade --link works. So:

  • On 18, mount /var/lib/postgresql and you can run pg_upgrade across 18/docker and 19/docker inside one volume.
  • On 17 and earlier, the convention was a mount at /var/lib/postgresql/data. A 19 container looks for its data in /var/lib/postgresql/19/docker instead. The entrypoint checks for a mount or existing data at /var/lib/postgresql/data and refuses to initialize, so the container exits with the error above instead of starting. The same check catches an 18 volume: it finds 18/docker next to the empty 19/docker and stops.

For small databases I'd just dump with the 19 client, which also gets around the standard_conforming_strings dump problem:

docker run --rm --network appnet postgres:19 \ pg_dumpall -h old-db -U postgres > all.sql docker exec -i new-db psql -U postgres < all.sql 

Whatever you choose, pin postgres:18 (or 17) in compose today, before your next docker compose pull hands you 19.

When RDS, Cloud SQL and Supabase will offer PostgreSQL 19

  • On AWS RDS, the release calendar stops at 18. AWS's stated policy is to add a new major "within 30 days of the community release" of the first minor, which means 19.1 rather than 19.0. 19.1 is due on February 11, 2027, so by that policy expect RDS by mid-March. 19 has been in the RDS Preview Environment since the betas, and those instances are deleted after 60 days.
  • Google Cloud SQL's versions page tops out at 18 and promises new majors "within 90 days" of GA. Counting from November 19, that's mid-February 2027.
  • For Supabase I couldn't find any announcement. Their upgrade docs are where it'll show up, and right now they only cover going from 15 to 17, skipping 16 entirely. Don't count on 19 soon.

Should you wait for 19.1?

The one real argument in the HN thread was about this. lfittl said that for critical production systems it's still good to wait for .1, and in a follow-up pointed to a crash in EXPLAIN (BUFFERS) without ANALYZE when auto_explain is on. It's an edge case, by lfittl's own description, but the fix "will only be in 19.1 in February 2027". They also noted SQL/PGQ was reverted "pretty late (beta4)". Answering the same question, guenthert said to put it in a test environment: "Waiting won't do you any good, if there are load-specific bugs."

I'm with both of them. Put 19 on staging this week, run the grep above, and fix your configs and dashboards now. Production waits for 19.1. If you're on RDS, AWS has effectively made that decision for you.

Are you upgrading to 19 now or waiting for 19.1? What made you decide? And if you've found a breaking change that isn't in this table, post it below.

Sources