Back to expertise

PostgreSQL 18: what to verify before a production upgrade

PostgreSQL 18 adds asynchronous I/O, planner improvements and operational features. A production database still depends on extensions, drivers, queries and storage behavior, so benefits must be demonstrated on a representative copy with a rehearsed rollback plan.

V
Virtek Engineering BoardSystems integration and operations

Capture the baseline

Inventory server, operating system, drivers, extensions and backup tooling. Save configuration, object sizes, expensive-query statistics, storage latency, critical operation times and peak load. Without a baseline, post-upgrade comparison is guesswork. Confirm application and extension support for the exact target release.

Test asynchronous I/O on your storage

PostgreSQL 18 introduces a new asynchronous I/O subsystem and selectable I/O methods. Gains depend on the OS, filesystem, storage array, cache and workload. Compare cold and warm cache, reports, backups, vacuum and concurrent transactions using a copy of the working set; a standalone disk benchmark is not sufficient.

Find changed query plans

Planner improvements include skip scan for multicolumn B-tree indexes. They may help, but a major upgrade can also change plans or expose stale statistics. Run a versioned set of critical SQL and compare EXPLAIN ANALYZE, duration, reads and locks. Verify ORM behavior, prepared statements, functions, data types and extensions. Adopt optional features such as UUIDv7 separately from the core upgrade.

Review access and observability

Version 18 expands OAuth and diagnostics, while MD5 authentication is deprecated. Inventory client libraries, pg_hba.conf rules, certificates, service accounts and emergency access before changing authentication. Establish comparable metrics for waits, I/O, replication, checkpoints, autovacuum and errors.

Rehearse upgrade and rollback

Choose logical or physical migration according to data volume and allowed downtime. Measure the real window and validate extensions, replicas, backups and integrity. PostgreSQL 18 can preserve planner statistics during pg_upgrade, but post-start analysis is still required. Define write freeze, application cutover and transaction handling before the change. Completion follows an observation period and verified business operations, not the first successful connection.

Need an architecture
for your workload?

We will review inputs, risks and constraints, then propose a reasoned solution.

Talk to an engineer