Migrations

PostgreSQL 19 Upgrade: Breaking Changes and New Defaults to Check First

PostgreSQL 19 is in release candidate, with general availability planned for November 19. Before you plan the upgrade, here are the changes that can stop pg_upgrade, break clients or quietly change performance.

· 13 min read · AG Data Team

The PostgreSQL 19 upgrade is close. RC1 shipped on October 15, and the release team has scheduled RC2 for November 12 and general availability for November 19, 2026. Most changes are welcome, but several of them can stop pg_upgrade, break old clients or change query performance without any error. This is the list we check before upgrading a production cluster.

Everything below comes from the PostgreSQL 19 release notes and the version 19 documentation. Release notes can still change before the final release, so check them again on release day.

Changes that can stop pg_upgrade

These are the ones to find first, because pg_upgrade refuses to run until they are fixed. On a large cluster you want to know about them weeks ahead, not during the maintenance window.

-- run in every database: indexes that will block pg_upgrade to 19
SELECT n.nspname, t.relname AS table_name, c.relname AS index_name, o.opcname
FROM pg_index i
JOIN pg_class c ON c.oid = i.indexrelid
JOIN pg_class t ON t.oid = i.indrelid
JOIN pg_namespace n ON n.oid = c.relnamespace
JOIN pg_opclass o ON o.oid = ANY (i.indclass::oid[])
WHERE o.opcname IN ('gist_inet_ops', 'gist_cidr_ops');

On a big table, building the replacement with CREATE INDEX CONCURRENTLY can take hours, and both indexes exist side by side until you drop the old one. Plan the disk space and do it well before the upgrade date.

Changes that can break clients and logins

A quick pre-upgrade scan for the items above:

-- names with CR/LF block pg_upgrade
SELECT 'database' AS kind, datname AS name FROM pg_database WHERE datname ~ '[\r\n]'
UNION ALL
SELECT 'role', rolname FROM pg_roles WHERE rolname ~ '[\r\n]'
UNION ALL
SELECT 'tablespace', spcname FROM pg_tablespace WHERE spcname ~ '[\r\n]';

-- RADIUS lines in pg_hba.conf stop working
SELECT line_number, type, database, user_name, auth_method
FROM pg_hba_file_rules WHERE auth_method = 'radius';

-- roles still on MD5 passwords (needs superuser)
SELECT rolname FROM pg_authid WHERE rolpassword LIKE 'md5%';

-- anything still running with standard_conforming_strings = off?
SHOW standard_conforming_strings;

New defaults that change performance

These do not raise errors. They show up later as slower or faster queries, or as different behaviour under load.

New features worth planning for

Do not jump on day one. A .0 release is new code. For critical clusters it often makes sense to wait for the first minor releases and use the time to clean up the blockers above, so the upgrade itself is boring.

What changes on large databases

Key takeaways

PostgreSQL PostgreSQL 19 Upgrade pg_upgrade
Work with us

Planning a PostgreSQL 19 upgrade?

We run pre-upgrade audits and upgrades of large PostgreSQL clusters with pg_upgrade or logical replication, with a rollback plan and minimal downtime.

Get in touch More from the blog