Databases · Reliability

PostgreSQL 19 Beta 4: test the upgrade, not the feature list

A practical pre-production test plan for PostgreSQL 19 Beta 4, covering reverted features, REPACK concurrency, replication, query plans and rollback evidence.

TOPIC HUBCloud, DevOps & Kubernetes
Original conceptual illustration of a database being reorganized between isolated test environments; not a PostgreSQL product screenshot.
An editorial interpretation of the topic, followed by a practical execution diagram.

PostgreSQL 19 Beta 4 is a test artifact, not an upgrade recommendation. The PostgreSQL project published it on 24 September 2026 and says that a release candidate is planned for early October, with general availability potentially later in October. The same announcement warns that behaviors and APIs can still change, while the project's beta guidance explicitly advises against production use.

That context matters because Beta 4 removed several features that had appeared earlier in the cycle: SQL/PGQ property-graph queries, online checksum toggling, `FOR PORTION OF` temporal updates and deletes, partition merge and split commands, and several DDL-introspection functions. A readiness review should therefore start from what Beta 4 actually contains—not from conference slides, earlier beta articles or remembered roadmaps.

The useful question is not whether the feature list looks attractive. It is whether your schema, extensions, drivers, operational tooling and representative queries behave correctly under the candidate version, and whether you can produce evidence strong enough to make an upgrade decision after GA.

Freeze the test target and its assumptions

Create an isolated PostgreSQL 19 Beta 4 environment from a reproducible image or package, record the exact build and configuration, and restore a sanitized production-shaped dataset. Do not point live applications at it. Capture the source PostgreSQL version, extension versions, collation provider, locale, `shared_preload_libraries`, authentication settings and every non-default parameter.

Inventory code that refers to reverted features or changed behavior. The release notes identify compatibility changes including mandatory `standard_conforming_strings = on`, removal of RADIUS support, JIT disabled by default, a higher default `max_locks_per_transaction`, and renamed statistics fields. PostgreSQL 19's `pg_upgrade` also rejects clusters with particular problematic `btree_gist` operator classes for `inet` or `cidr`. These are concrete checks, not release-note trivia.

Run the production migration mechanism you would actually use: `pg_upgrade`, dump and restore, or logical replication. Time each phase and preserve logs. A successful startup is only the first gate; validate row counts, constraints, indexes, sequences, privileges, generated objects and extension health before replaying traffic.

Replay real queries and compare plans

Collect a representative workload rather than a synthetic handful of happy paths. Include high-frequency OLTP statements, expensive analytical queries, lock-heavy transactions, background jobs, schema migrations and failure-prone edge cases. Remove secrets and personal data, but retain parameter distributions that influence selectivity.

For each important query, store latency percentiles, rows returned, buffer activity, temporary-file use and the complete `EXPLAIN (ANALYZE, BUFFERS, WAL)` plan on the current production major and Beta 4. PostgreSQL 19 adds more planner and executor changes, including more anti-join transformations, pre-join aggregation opportunities and improved foreign-key checks. It also adds `EXPLAIN ANALYZE` I/O reporting for asynchronous I/O. Improvements are workload-dependent; a changed plan is neither a win nor a regression until measured.

Use thresholds tied to service objectives. For example, reject a candidate if a critical query's p95 latency rises beyond an agreed percentage, if temporary bytes exceed a storage budget, or if plan instability appears across parameter classes. Keep the raw plans so the team can explain the result instead of arguing from averages.

Treat REPACK as a resource and locking experiment

The new `REPACK` command rewrites a table to reclaim space and can reorder rows using an index. Without `CONCURRENTLY`, it takes an `ACCESS EXCLUSIVE` lock for the operation. With `CONCURRENTLY`, PostgreSQL copies the table and indexes, captures concurrent changes through logical decoding, applies them, and holds the exclusive lock mainly for the final file swap.

This is not a free online operation. The documentation says a normal rewrite needs free disk at least equal to the table plus its indexes; a sequential scan plus sort can peak at roughly twice the table size plus indexes. Concurrent DML can add more temporary storage. DDL during the operation can cause it to fail, and the current documentation warns that concurrent repacking is not MVCC-safe. Beta 4 itself contains multiple fixes for REPACK crashes, invalid indexes, materialized views, permissions and error reporting.

Build a test matrix around the largest and busiest tables. Measure peak temporary storage, WAL generation, replica lag, I/O saturation, lock-wait duration, query latency during the copy, and the final swap pause. Inject DDL, cancellation, disk pressure and a client disconnect. Verify the table and every index afterward, then run `ANALYZE` or use the documented option so the planner sees the new physical order.

repack gate =
  enough temporary space
  AND bounded replica lag
  AND bounded swap lock
  AND verified table/index integrity
  AND a tested failure cleanup path

Do not turn REPACK into an automated production maintenance policy until the released version, your storage headroom and the failure path have all passed this gate.

A useful beta test moves a production-shaped copy through compatibility, workload, maintenance, replication and rollback gates before any adoption decision.
A useful beta test moves a production-shaped copy through compatibility, workload, maintenance, replication and rollback gates before any adoption decision. Open for a larger view

Exercise replication and read-your-writes paths

PostgreSQL 19 can replicate sequence values through logical replication and can enable logical replication without a restart when `wal_level` is already `replica`. It also introduces a wait command for making a standby wait until it has replayed changes to a selected point, supporting read-your-writes patterns. These features touch correctness boundaries, so test them under disruption.

Create a publication and subscription shaped like production. Drive inserts that allocate sequence values, explicit sequence changes, failover-like disconnects and resynchronization. Verify that generated identifiers cannot collide after a role change and that monitoring distinguishes table synchronization failures from sequence errors. Beta 4 includes fixes for initial synchronization from older PostgreSQL versions and for logical-replication conflict detection, which is a signal to test those exact paths.

For standby reads, measure the end-to-end delay from commit token to readable state. Test cancellation, timeout, replica restart and a lagging standby. The application needs a bounded policy: wait, fall back to the primary, return a retryable response, or accept stale data for a specific request. A database command does not choose that product trade-off for you.

Test operations, not only SQL

Run backup and point-in-time recovery with the same tools, retention rules and object storage used in production. Restore to a fresh host and prove that the application can connect. Exercise monitoring exporters, connection poolers, CDC connectors, migration frameworks, ORM drivers and privileged maintenance jobs. Check dashboards for renamed or newly split statistics instead of assuming missing data means zero.

PostgreSQL 19 changes autovacuum scheduling with a scoring system and allows parallel workers for index vacuuming. Replay churn-heavy tables and watch dead tuples, freeze age, worker usage, I/O contention and whether smaller tables are starved. If JIT mattered to analytical workloads, compare the new disabled-by-default behavior with an explicitly enabled, measured configuration rather than restoring the old default blindly.

Security tests belong in the same run: authentication methods, password-expiration warnings, TLS verification, role inheritance, row-level security, `SECURITY DEFINER` functions and backup credentials. Compatibility is an application property and an operational property at the same time.

Make the adoption gate evidence-based

End with a scorecard that names the owner, dataset, command, threshold, result and evidence link for every gate. At minimum include migration time, application compatibility, critical-query latency, plan regressions, REPACK resource peaks, replication correctness, replica lag, backup restore, extension support, observability coverage and rollback time.

A beta pass is not approval to deploy a beta. It reduces uncertainty before the release candidate and gives extension and tool maintainers time to respond. Re-run the suite on the release candidate and again on the exact GA packages you intend to deploy; features or fixes may still move.

The strongest outcome from PostgreSQL 19 Beta 4 is not a list of new syntax. It is a reproducible body of evidence: which features remain, which assumptions broke, how much headroom maintenance consumes, whether replicas preserve correctness and how quickly the team can return to a known-good state. That is what turns a future major-version upgrade from hope into an engineering decision.

Official references

These references document the tools discussed. Examples and design decisions are illustrative and should be adapted to the project and its versions.

Prepared by: Noor Yasser

FROM DECISION TO DELIVERY

Working through a similar engineering challenge?

I help teams turn architecture decisions into a clear scope and dependable, reviewable implementation.

Book a 30-minute callRelated servicePerformance, cloud & deliveryRelevant projectMurshid