These are the changes too small for their own pages, grouped by whether they cost you anything. The I/O worker autoscaling that is also part of the performance story is covered on the asynchronous I/O page.
“Will my plans change?” - the rewrite rules
The planner now rewrites more of your SQL before costing it. Each is a win in expectation and a diff in practice - EXPLAIN output that differs from an 18 baseline is usually this list working, not a regression:
NOT INbecomes an anti join when NULLs cannot occur (non-nullable columns, or constraints proving it). Anti joins plan and execute better than theNOT INfallback, but the plan shape - and the textEXPLAINprints - is different.- More
LEFT JOINs convert to anti joins where the query only asks whether a match exists, and Memoize now applies to anti joins with unique inner sides - repeated existence probes cache instead of rescanning. - Some aggregation runs before joins - counting or summing a side before joining it reduces the rows the join must carry. New plan shapes for reporting queries.
Append/MergeAppendcan now use explicit incremental sorts, and semijoin planning is improved generally.- A family of expression simplifications:
IS [NOT] DISTINCT FROM NULLfolds toIS [NOT] NULL,IS [NOT] DISTINCT FROMbecomes plain equality when both sides are proven non-nullable,var IS NULLfolds earlier,COALESCE()andROW(...) IS NULLskip arguments they cannot need, andIS [NOT] TRUE/FALSE/UNKNOWNsimplifies on non-nullable inputs. None changes results; all make the expression tree smaller and more optimisable. - The planner now weighs startup costs of partial paths - the time-to-first-row estimate is part of path selection, not just total cost.
“What got faster without me doing anything?” - executor and WAL-adjacent work
- Foreign-key constraint checks are faster - every
INSERT,UPDATEandDELETEagainst a referenced table pays this; write-heavy workloads against referenced parents gain the most. - Sorting uses radix sort where applicable.
COPY FROMtext and CSV parsing uses SIMD CPU instructions, as dohex_encode/hex_decode; internal row deformation and UTF-8 case folding are faster. Bulk loads and text-heavy parsing benefit without a setting change.NOTIFYwakes only backends listening on the notified channel - previously most backends woke on any notification; systems usingLISTEN/NOTIFYfor job queues stop paying wakeup tax per notification.hash indexbulk deletion andGINvacuuming use streaming reads, matching the read pattern the async I/O work assumes.
“What is different about the buffer and visibility machinery?”
- Sequential table scans can now set the visibility-map all-visible bit themselves. Before 19,
only
VACUUM(orCOPY FREEZEat load) could mark a page all-visible, which is what enables index-only scans; a scanned table now moves toward index-only eligibility without waiting for the vacuum cycle. - TID range scans can be parallelised - queries that scan
ctidranges (some vacuum and sampling tools do) can spread over workers. timing_clock_sourceis a new GUC choosing the timing source, relevant toEXPLAIN (ANALYZE, TIMING)andpg_test_timing- on platforms where clock reads are costly, the timing overhead reported byANALYZEcan be reduced.
“What changed in statistics?”
- Extended statistics on virtual generated columns are now allowed -
CREATE STATISTICScan cover them, so estimates on generated expressions can stop falling back to selectivity guesses. pg_restore_extended_stats()restores extended statistics objects (used bypg_dump), andpg_clear_extended_stats()clears them for a fresh rebuild.- Join selectivity computations are faster at large
default_statistics_targetvalues - the statistics target you raised for better estimates costs less planning time. - Boolean-returning functions get genuine planner statistics rather than a generic estimate.
pg_aggregate.aggtransspaceaccepts negative values meaning unbounded aggregate memory, which the planner uses when costing aggregation memory.
“Do any of these need action before or after the upgrade?”
Two do, and they are also in the overview’s upgrade checklist:
- JIT is off by default. Previously enabled with cost-based activation; the costing proved
unreliable. Large analytical workloads that benefited need
jit = onset deliberately. max_locks_per_transactiondefaults doubled (64 to 128) because lock entry sizing changed - a tuned value must be doubled, not carried over.
The rest of the list needs no action - but if you regression-test plans, expect diffs in
anti-joinable NOT IN queries and aggregate-heavy reporting, and confirm they are improvements
rather than assuming the plan changed for a reason you need to find.
What changed, and in which release
| Change | PG 18 and earlier | PG 19 | |
|---|---|---|---|
NOT IN planning |
NOT IN evaluated as-is; NULL semantics forced a slower shape |
Anti-join rewrite when NULLs are impossible | |
| Aggregate-then-join | Aggregates costed after joins | Some aggregation pushed below the join | |
| Visibility-map maintenance | Only VACUUM / COPY FREEZE set all-visible |
Sequential scans set it too | |
NOTIFY wakeup |
Most backends woke per notification | Only listeners on the channel wake | |
| JIT default | On, cost-gated | Off; set jit = on deliberately |
|
| Extended stats on virtual generated columns | Not allowed | Allowed | |
| LOCK TABLE contention visibility | Not measurable | Not here - that is pg_stat_lock, on the monitoring page |
Where it breaks
- Pinned plans and documented plans diverging from reality - runbooks and
pg_stash_adviceentries written against 18 plan shapes can silently mismatch; check theEXPLAINfeedback the plan advice page describes forfailedorinapplicable. - Assuming a faster
NOT INmeans the schema can stay NULLable - the rewrite only applies when NULLs cannot occur; aNOT NULLconstraint is what unlocks it. - Timing comparisons between releases -
timing_clock_sourcemeans measured execution timing can differ from clock-source choice, not only from speed. - Assuming identical plans post-upgrade - the planner rewrites below (NOT IN to anti join,
aggregate pushdown, expression simplification) are real changes, so a plan pinned in a runbook or
pg_stash_advicecan legitimately differ after the upgrade.
What this is not for
- Tuning - this is the change inventory, not the tuning guide; the statistics and
EXPLAINchanges are tools, and which knobs to turn is workload work. - The I/O worker autoscaling - that has its own page: asynchronous I/O.
PostgreSQL release support
5 supported| Release | Latest | Released |
|---|---|---|
19 | 19.0 | Nov 2026 |
18 | 18.7 | Sept 2025 |
17 | 17.12 | Sept 2024 |
16 | 16.16 | Sept 2023 |
15 | 15.20 | Oct 2022 |
Data as of 2026-11-21 from endoflife.date. Refresh with node scripts/fetch-versions.mjs.
What to watch
Specific things that would change what this page concludes.
- JIT shipped disabled by default - whether a point release revisits the costing, and whether distributions override the default
Where PostgreSQL sits
How this component relates to the rest of the stack. Items without a link are not covered here yet.