PostgreSQL major upgrades are generally painless from the application point of view.
Compatibility across different versions—in terms of the features typically used by applications—is very high, and any exceptions are well-documented. Nevertheless, some updates can cause issues; this brief guide aims to summarize the most significant ones.
This document is not a history of PostgreSQL features.
It complements a feature matrix and release-specific feature pages by identifying changes
that may affect an existing installation when moving between major PostgreSQL versions.
While greater attention is given to more recent versions, significant space is also devoted to versions that are no longer supported.
We concentrate on changes that affect applications.
System views or management functions that affect DBAs or tools are reported but are classified as low risk.
The focus is on four kinds of risk:
Ultimately, the goal of this guide is to support the statement:
PostgreSQL major upgrades are always painless from the application point of view...
if carefully planned!
| Target | Principal upgrade concerns | Risk |
|---|---|---|
| 19 | standard_conforming_strings; unsafe names; btree_gist inet/cidr opclasses; JIT OFF; Indexes REBUILD; RADIUS/legacy compatibility; changed defaults and autovacuum behavior. | 🔴 |
| 18 | VACUUM/ANALYZE inheritance behavior; CSV COPY semantics; AIO; skip scan; retained optimizer statistics; new-cluster checksum default. | 🟠 |
| 17 | Safe search_path during maintenance; VACUUM memory management; planner/monitoring changes; logical-slot preservation. | 🟠 |
| 16 | PL/pgSQL cursor semantics; REINDEX DATABASE scope; removed parameters/features; planner/parallelism; VACUUM freezing; new I/O statistics. | 🟢 |
| 15 | New public-schema defaults for new databases; exclusive backup mode removed; hash_mem_multiplier default 2.0; sorting/planner changes; Python 2 language removal. | 🟢 |
| 14 | Built-in array function signatures; EXTRACT() type; aggressive anti-wraparound VACUUM; planner/statistics changes; B-tree behavior. | 🟠 |
| 13 | wal_keep_segments→wal_keep_size; effective_io_concurrency semantics; B-tree deduplication; incremental sort; parallel VACUUM; extension packaging. | 🟢 |
| 12 | CTE inlining; JIT ON by default; recovery.conf removed; OID columns removed; obsolete types/extensions removed. | 🔴 |
| 11 | JIT introduced but OFF; pg_dump behavior; partitioning/planner changes; optimizer statistics; parallelism; ADD COLUMN ... DEFAULT behavior. | 🟢 |
| 10 | Hash indexes; xlog→wal; SRF semantics; authentication/client compatibility; parallel query defaults. | 🟢 |
Only the most recent major PostgreSQL versions have been reported. For older releases (e.g. 8.3 🔴 implicit cast removal, 9.0 🟠 BYTEA format change, 9.1 🔴 standard_conforming_strings, 9.5 🟠 operator precedence), consult the corresponding release notes.
| Risk | Meaning |
|---|---|
| 🔴 High | Stop and fix. The upgrade can fail, produce incorrect results, or break a critical operational path in an affected installation. Check and fix before upgrading. |
| 🟠 Medium | Test and decide. The change can affect an existing workload or operational procedure under identifiable conditions. Test before upgrading if applicable. |
| 🟢 Low | Note and fix later. Worth reviewing or cleaning up, but normally does not prevent the upgrade and can safely be addressed afterwards. |
PG19 is a recently introduced major version, the upgrade can have a potentially high impact 🔴 but the evaluation can change in a near future. Anyway do not be impatient to adopt it in production.
| Area | Change / risk | What to check |
|---|---|---|
| Indexes | 🔴 Affected btree_gist inet/cidr opclass indexes are a migration blocker. pg_upgrade rejects them because the old opclasses can return incorrect results. | Inventory and rebuild/change affected GiST indexes before upgrade. |
| SQL / strings | 🔴 For affected legacy SQL/dumps, standard_conforming_strings is forced ON. | Regenerate old dumps with a current tool and test SQL that depends on backslash escapes. This is a blocker only when such legacy material exists. |
| Indexes | 🟠 Some indexes may need to be rebuilt. | There are conditions in which indexes must be rebuilt after the upgrade and other in which may need to be rebuilt. |
| Identifiers | 🟠 CR/LF in database, role and tablespace names is rejected; pg_upgrade rejects such clusters. | Check object names before upgrade; rename affected objects. |
| JIT | 🟠 JIT default changes back to OFF. This is a workload-level compatibility issue, not a migration blocker. | Benchmark analytical queries; explicitly set jit=on where it still pays off. |
| Autovacuum | 🟠 Parallel autovacuum and new table-priority scoring change maintenance concurrency. | CPU/I/O budget, autovacuum worker configuration and high-churn tables. |
| Authentication | 🟠 MD5 authentication warns and remains available for now. | Inventory MD5 passwords, legacy clients and connection pools. |
| Authentication | 🟠 RADIUS support is removed. This is a migration blocker. | Inventory RADIUS use, legacy clients and connection pools. Replace RADIUS before upgrade if used [NdE RADIUS is infrequently used]. |
| Locks | 🟢 max_locks_per_transaction default increases from 64 to 128. | Revisit explicit settings and shared-memory sizing later; do not copy the old value mechanically. |
| TOAST | 🟢 Default TOAST compression changes from pglz to lz4. | Monitor new/rewritten data and CPU/space trade-offs; existing TOAST data is not rewritten just because of the upgrade. |
| Monitoring | 🟢 Several system-view columns/wait-event names change. | Update monitoring queries and dashboards during post-upgrade validation. |
| Area | Change / risk | What to check |
|---|---|---|
| AIO / I/O | 🟠 Asynchronous I/O changes the execution and maintenance I/O profile. | Sequential scans, bitmap heap scans, VACUUM, storage latency and I/O saturation. |
| Planner / indexes | 🟠 Skip scans on multicolumn B-tree indexes can produce new plans. | Compare plans for queries whose predicates do not constrain the leading index column. |
| VACUUM / ANALYZE | 🟠 VACUUM and ANALYZE now process inheritance children of a parent unless ONLY is specified. | Maintenance scripts, especially partitioned/inheritance hierarchies and parent-table maintenance policies. |
| COPY | 🟠 CSV COPY FROM no longer treats \. as EOF. | Old psql clients, \copy, CSV ingestion scripts and embedded data containing that sequence. |
| Triggers | 🟠 AFTER triggers execute as the role active when events were queued. | Workloads that change authorization context between trigger queueing and commit. |
| Checksums | 🟢 initdb now enables data checksums by default for new clusters. pg_upgrade requires matching checksum settings. | Explicitly inspect old/new checksum state when building the target cluster. |
| Statistics | 🟢 pg_upgrade now retains most optimizer statistics. This changes the traditional post-upgrade assumption that all statistics must be regenerated. | Do not blindly schedule a full ANALYZE solely because pg_upgrade was used. Verify statistics and workload first; treat extended statistics separately where applicable. |
| Generated columns | 🟢 Virtual generated columns are now the default for new definitions. | DDL/deployment tooling and applications that assume stored generated-column behavior. |
| Authentication | 🟢 MD5 password authentication is deprecated. | Inventory pg_authid/role password formats and clients before a future MD5 removal. |
Source: PostgreSQL 18 Release Notes
| Area | Change / risk | What to check |
|---|---|---|
| Maintenance / search_path | 🟠 Maintenance operations use a safer search_path. Functions used by expression indexes/materialized views that require non-default schemas may fail unless their search path is specified. | Expression indexes, materialized views, ANALYZE/VACUUM/REINDEX/CLUSTER jobs and SECURITY DEFINER-style code. |
| Snapshot behavior | 🟠 old_snapshot_threshold removed. | Configurations and operational procedures that used snapshot-too-old behavior. |
| Monitoring | 🟠 Several statistics columns/views changed. For example pg_stat_bgwriter loses fields now covered by pg_stat_io, and pg_stat_statements I/O timing columns are renamed. | Monitoring/reporting SQL and exported metrics. |
| VACUUM | 🟠 New memory management can materially change resource usage. VACUUM is no longer silently limited to 1 GB when maintenance/autovacuum work memory is larger. | Large tables, high-TPS systems and autovacuum concurrency; monitor memory, WAL and I/O. |
| Planner | 🟠 More CTE, subquery, partition and parallelization optimizations. | Compare representative execution plans. |
| Logical replication | 🟢 pg_upgrade can preserve logical replication slots/subscription state. | Validate slot preservation and failover procedures rather than treating the upgrade as a clean-slate logical replica. |
Source: PostgreSQL 17 Release Notes
| Area | Change / risk | What to check |
|---|---|---|
| Planner / parallelism | 🟠 More parallel join cases and optimizer changes can alter plans. | Capture plans for large joins and mixed workloads. |
| PL/pgSQL | 🟢 Bound cursor variable assignment semantics changed. | Stored procedures/functions using named cursor variables. |
| REINDEX | 🟢 REINDEX DATABASE no longer processes system-catalog indexes. | Maintenance scripts that relied on it for a complete database-wide rebuild; use REINDEX SYSTEM where appropriate. |
| Configuration | 🟢 force_parallel_mode renamed to debug_parallel_query. | Configuration management and test scripts. |
| Removed parameters | 🟢 vacuum_defer_cleanup_age and promote_trigger_file removed. | Standby promotion scripts and old tuning guides. |
| VACUUM | 🟢 Freezing and VACUUM efficiency improved. | Compare maintenance duration, WAL and I/O; do not assume identical maintenance profiles. |
| Monitoring | 🟢 pg_stat_io changes what is visible and can replace older monitoring assumptions. | Monitoring queries and reports using pg_stat_bgwriter or older statistics. |
Source: PostgreSQL 16 Release Notes
| Area | Change / risk | What to check |
|---|---|---|
| Backup | 🟠 Exclusive backup mode removed. Backup functions were renamed to pg_backup_start/stop. | Backup scripts and monitoring. |
| Memory / hashes | 🟠 hash_mem_multiplier default increases from 1.0 to 2.0. | Memory consumption of hash joins/aggregates, especially with many concurrent sessions. |
| Sorting / planner | 🟠 Sorting performance and planner behavior changed substantially. | Compare top SQL, especially sort-heavy queries and workloads sensitive to work_mem. |
| Python | 🟠 Python 2 server-side language support removed. | Installed procedural languages and extensions. |
| Security defaults | 🟢 New clusters/new databases no longer grant CREATE on schema public to PUBLIC; ownership changes to pg_database_owner. Existing upgraded databases retain their permissions. | Schema creation patterns, application users and provisioning scripts. Do not confuse cluster upgrade with creation of new databases. |
| New features | 🟢 MERGE command. | Powerful new features: can not be used in previous versions. |
Source: PostgreSQL 15 Release Notes
| Area | Change / risk | What to check |
|---|---|---|
| Function dependencies | 🟠 Built-in array-function signatures changed from anyarray to anycompatiblearray. User-defined aggregates/operators referencing those signatures may need recreation. | Run pg_upgrade --check and inspect dependencies involving affected functions. |
| SQL result types | 🟠 EXTRACT() returns numeric instead of float8. | Client code, PL/pgSQL variables, casts and application interfaces expecting float8. |
| VACUUM / XID | 🟠 VACUUM becomes more aggressive as wraparound approaches. | Monitor autovacuum/vacuum activity and long-running transactions; do not assume historical anti-wraparound behavior remains identical. |
| Planner | 🟠 Extended statistics on expressions and many optimizer improvements can change plans. | Compare representative plans after ANALYZE, especially expression-heavy predicates. |
| Connection | 🟢 Wire protocol v2 desupport | Wire protocol v2 have been used by Postgres 6 desupported more than twenty years ago. |
| B-tree | 🟢 More efficient index updates can change bloat and write behavior. | Monitor index growth and write-heavy workloads rather than assuming identical bloat rates. |
Source: PostgreSQL 14 Release Notes
| Area | Change / risk | What to check |
|---|---|---|
| WAL configuration | 🟠 wal_keep_segments removed and replaced by wal_keep_size. | Convert configuration and automation; validate standby retention requirements. |
| I/O concurrency | 🟠 Meaning of non-default effective_io_concurrency changed. | Re-evaluate tuned values rather than copying them blindly. |
| Planner | 🟠 Incremental sort and improved extended-statistics planning can change plans. | Capture ORDER BY / LIMIT queries and queries using extended statistics. |
| VACUUM | 🟠 Parallel index vacuuming changes maintenance resource usage. | Observe CPU/I/O during VACUUM and autovacuum on large indexes. |
| Extensions | 🟠 Unpackaged/pre-9.1 extensions can no longer be upgraded. | Inventory extensions and convert legacy unpackaged installations before upgrade. |
| B-tree | 🟢 B-tree deduplication changes index size and maintenance behavior. | Monitor index size, write amplification and query plans; consider indexes where deduplication is particularly relevant. |
Source: PostgreSQL 13 Release Notes
| Area | Change / risk | What to check |
|---|---|---|
| JIT | 🔴 JIT becomes ON by default when PostgreSQL is built with JIT support. This is a classic silent performance change. | Compare CPU and latency of expensive queries; explicitly set jit if required by workload policy. |
| Planner / CTE | 🟠 CTEs are no longer unconditionally materialized. Non-recursive, side-effect-free CTEs may be folded into the parent query. | Capture plans for SQL that relies on CTE materialization as an optimization/fence. Use MATERIALIZED where required. |
| Recovery | 🟠 recovery.conf is removed. Settings move to postgresql.conf; recovery.signal/standby.signal are used instead. | Standby/PITR provisioning, automation and startup checks. |
| OIDs | 🟠 WITH OIDS / implicit table OIDs removed. | Search DDL, application code and catalog queries for assumptions about hidden OID columns. |
| Obsolete types | 🟢 abstime, reltime, tinterval and timetravel removed. | Check old schemas and extensions before upgrade. |
| Statistics | 🟢 ANALYZE statistics use each column's collation. | Queries relying on non-default collations; compare plans after ANALYZE. |
Source: PostgreSQL 12 Release Notes
| Area | Change / risk | What to check |
|---|---|---|
| Dump/restore | 🟠 pg_dump/pg_dumpall database-property behavior changed. | Test dump/restore automation, database-level GRANTs and ALTER DATABASE SET. |
| Planner | 🟠 Statistics and selectivity estimation improved; partition pruning and parallel planning changed. | Compare representative plans, especially partitioned-table and highly selective queries. |
| Partitioning | 🟠 More complete partitioning behavior can change planning and DML paths. | Large partitioned tables and queries with pruning are high-value regression tests. |
| Parallelism | 🟠 More operations can use parallel workers. | Monitor CPU, worker exhaustion and latency under mixed OLTP/analytical loads. |
| DDL performance | 🟢 ADD COLUMN with a non-null constant default can avoid a table rewrite. | Operational runbooks that assumed a long rewrite may now have different lock/runtime characteristics. |
| JIT | 🟢 JIT introduced, but OFF by default. This is the important baseline for the later PG12 default change. | Do not assume an upgrade to 11 enables JIT. Record the explicit/compiled configuration if relevant. |
| New features | 🟢 SQL stored procedures, transaction control in PL/pgSQL. | Powerful new features: can not be used in previous versions. |
Source: PostgreSQL 11 Release Notes
Upgrade context: the first major release using the modern two-digit major-version scheme. The migration notes contain several changes that affect DBA scripts and monitoring as well as SQL behavior.
| Area | Change / risk | What to check |
|---|---|---|
| Storage / tooling | 🟠 pg_xlog→pg_wal, pg_clog→pg_xact; WAL functions/tools changed from xlog terminology. | Filesystem scripts, monitoring, backup/archive scripts, shell automation and hard-coded paths/names. |
| Indexes | 🟠 Hash indexes must be rebuilt after pg_upgrade. | Run the generated post-upgrade script and verify hash indexes. |
| SQL semantics | 🟠 Set-returning functions in SELECT lists changed semantics. | Search application SQL and stored code using multiple SRFs or SRFs in CASE/COALESCE. |
| Authentication | 🟠 Unencrypted server passwords removed; SCRAM introduced. Old clients may also be affected by stronger default DH parameters. | Client versions, SSL compatibility and password storage. |
| Parallelism | 🟠 Parallel query became more readily used; default max_parallel_workers_per_gather=2. | CPU saturation, worker availability and latency-sensitive OLTP workloads. |
| Sequences | 🟢 Sequence relation layout changed. Direct reads from sequence relations no longer expose the old set of columns. | Catalog/reporting code selecting directly from sequence relations. |
| Backup | 🟢 pg_basebackup WAL method default changed to streaming. | Backup scripts and expected network/WAL behavior. |
| New features | 🟢 Built-in Logical Replication, native Table Partitioning, conditional scripting in psql. | Powerful new features: can not be used in previous versions. |
Source: PostgreSQL 10 Release Notes
Default changes deserve a separate view because they can silently alter an existing workload without any SQL or catalog incompatibility.
| Change | Release | Upgrade relevance |
|---|---|---|
| JIT OFF | 19 | Analytical workloads may need an explicit jit=on. |
| TOAST compression default pglz → lz4 | 19 | Relevant mainly to newly compressed/rewritten data. |
| Data checksums enabled by default for new clusters | 18 | Cluster initialization and pg_upgrade checksum compatibility matter. |
| Virtual generated columns become the default | 18 | New DDL behavior; existing stored generated columns are not silently converted. |
hash_mem_multiplier=2.0 | 15 | Hash operations may consume more memory. |
| JIT ON when compiled with LLVM | 12 | Potential CPU/latency change, particularly for OLTP workloads with expensive queries. |
| JIT introduced, but OFF | 11 | Feature exists without changing existing workload behavior by default. |
Parallel query becomes more readily enabled; max_parallel_workers_per_gather=2 | 10 | CPU/worker consumption can change after upgrade. |
The following changes are especially important because an upgrade can succeed completely while the workload behaves differently.
| Area | Examples | Recommended comparison |
|---|---|---|
| Planner | CTE inlining, incremental sort, extended statistics, skip scan, join transformations, parallelism. | Representative SQL plans before/after; estimated vs actual rows; join/sort/hash choices. |
| JIT | PG12 ON; PG19 OFF. | CPU time and execution time of expensive queries. |
| VACUUM | PG14 anti-wraparound behavior; PG17 memory management; PG18 parent/child maintenance; PG19 parallel autovacuum. | Vacuum duration, WAL, I/O, CPU, oldest xmin, dead tuples and freeze age. |
| I/O | PG17 streaming I/O improvements; PG18 AIO. | Read latency, IOPS, throughput, CPU and wait events. |
| Statistics | Planner-statistics algorithms evolve; PG18 pg_upgrade retains optimizer statistics. | Statistics state and plan quality; do not rely on a generic “ANALYZE everything” rule. |
| Memory | PG15 hash_mem_multiplier; PG17 VACUUM memory; PG19 lock memory. | Peak memory and concurrency under representative workload. |
A major upgrade is not the only place where a PostgreSQL installation can regress. Minor releases and OS upgrades can matter too. Minor releases are normally the safest way to stay current, but there have been exceptional cases where a fix introduced a regression and was quickly replaced.
CREATE INDEX CONCURRENTLY/REINDEX CONCURRENTLY corruption bug, fixed in 14.4.Record the exact source and target minor release, not only the major version, and keep a rollback path for exceptional regressions.
The glibc library is a vital core library for GNU systems — including all Linux distributions —
because it contains fundamental C functions such as
printf, open, read, write, malloc, and more.
Among the functions it provides are those for string sorting, which account for locale-specific characters—a process known as collation.
Version 2.28 of glibc introduced a significant change:
glibc-2.28 (2018-08) Major new features: * The localization data for ISO 14651 is updated to match the 2016 Edition 4 release of the standard, this matches data provided by Unicode 9.0.0. This update introduces significant improvements to the collation of Unicode characters.
PostgreSQL —though with some variations between versions—
uses glibc to define string collation; this change in collation leads to index corruption and
requires a REINDEX.
The adoption of glibc 2.28
makes operating system upgrades to the versions listed in the table critical:
| Distribution | Version | Date (GA) |
|---|---|---|
| Fedora | 29 | 2018-10 |
| Ubuntu | 18.10 (Cosmic Cuttlefish) 20.04 LTS (Focal Fossa) | 2018-10 2020-04 |
| Red Hat Enterprise Linux / CentOS | 8 (Oopta) | 2019-05 |
| Debian | 10 (buster) | 2019-07 |
| Suse Linux Enterprise Server | 15 SP3 | 2021-06 |
Carefully plan OS upgrades and do not use different OS versions when using Streaming Replication.
In terms of database connectivity, PostgreSQL offers a very high level of compatibility.
It is possible to use drivers and tools that have long been unsupported without encountering any significant issues.
Before offering a few useful caveats, it is worth noting that there are various methods for establishing a connection: libpq, pgJDBC, pgODBC.
libpq is...
Java applications use pgJDBC.
pgODBC
PG14 desupported Wire protocol v2 that have been used by Postgres 6 [NdA GA in 1997 and desupported in 2004: quite a long ago]
In any case, it is always recommended to use the most recent versions of connection drivers available, in order to avoid bugs and security issues.
| Check | Purpose |
|---|---|
| Configuration diff | Compare old settings with target-version defaults; explicitly identify removed, renamed and default-changed parameters. |
| Extension inventory | Verify versions, shared libraries, ABI compatibility and upgrade procedures. |
| Client inventory | Check libpq, JDBC/ODBC, psql, poolers, backup tools and monitoring agents. |
| SQL / plan baseline | Capture representative plans and execution statistics for important queries. |
| Maintenance baseline | Record VACUUM/ANALYZE duration, WAL, CPU, I/O, freeze age and autovacuum behavior. |
| Replication baseline | Record physical/logical replicas, slots, lag and failover procedures. |
| Automation search | Search scripts for removed/renamed functions, directories, GUCs, catalog columns and wait-event names. |
| Security baseline | Review pg_hba.conf, password formats, schema privileges and SECURITY DEFINER/search_path assumptions. |
| Check | Purpose |
|---|---|
| Startup and logs | Confirm clean startup and identify warnings related to obsolete parameters, extensions or authentication. |
| Extensions | Verify all required extensions are installed and at compatible versions. |
| Replication | Verify streaming, logical slots/subscriptions and failover behavior. |
| Statistics | Inspect optimizer statistics and run targeted ANALYZE where justified by the target release and workload. |
| Top SQL | Compare latency, CPU, calls, plans and rows for representative/high-value statements. |
| Maintenance | Compare VACUUM/autovacuum/ANALYZE duration and resource consumption. |
| WAL / I/O | Compare WAL generation, checkpoints, I/O throughput and latency. |
| Memory | Check changes in hash operations, VACUUM, locks and parallel workers. |
| Monitoring | Validate dashboards and queries against changed system views/columns/wait events. |
Some compatibility checks are specific to pg_upgrade, some to dump/restore, and some affect both. In particular, do not assume that a successful pg_upgrade proves application compatibility: planner, default and runtime behavior can only be validated with workload testing.
| Issue | pg_upgrade | Dump / restore | Workload test |
|---|---|---|---|
| Binary/catalog compatibility | Yes | Handled by restore | No |
| Removed SQL objects/types | May fail/check | May fail during restore | Yes |
| Planner changes | Not detected | Not detected | Required |
| Changed defaults | Not necessarily detected | Not necessarily detected | Required |
| External scripts/tooling | Not fully detected | Not fully detected | Operational test required |
The primary source for each version is the PostgreSQL project's release documentation, especially the Migration to Version X section and the optimizer, performance, maintenance, replication and configuration sections:
The link Your PostgreSQL stinks! contains a useful summary table for each release,
and the PG_CVE tool helps in finding yanked or defective minor releases.
For the most recent PostgreSQL versions, a detailed description of the new features and any changes
can be found in the following pages (in Italian 🇮🇹):
PG19, PG18, PG17, PG16,
PG15, PG14.
Title: PostgreSQL Major Upgrades
Level: Advanced
Date: 31st October 2026 🎃
Version: 1.0.0 -
31st October 2026 🎃
Author:
mail [AT] meobogliolo.name