· via Hacker News – Front Page (native)
PostgreSQL 19 lands with native REPACK, autovacuum scoring and planner advice
PostgreSQL 19.0, released 19 November 2026, adds IGNORE NULLS and other SQL conveniences, a native REPACK command for table rewrites, autovacuum priority scoring and new planner advice tools.
PostgreSQL 19.0 shipped on 19 November 2026, and a hands-on walkthrough from Certuvia — currently on the Hacker News front page — runs through the highlights on a live server that readers can try from the browser. Beyond the headline SQL additions, the release touches maintenance, autovacuum scheduling and replication. Every feature in the tour links to its official documentation, with the release notes remaining the complete change log.
New SQL for everyday queries
The tour walks through several additions at the prompt: IGNORE NULLS, a get-or-create form of insert, JSON export, JSONPath transformations and range subtraction. Rather than describing them in the abstract, the article demonstrates each one on the installed 19.0 server so readers can see the result of a query directly.
REPACK: table rewrites become a built-in
Deleting rows leaves space that ordinary vacuum marks as reusable but never returns to the operating system. PostgreSQL 19 adds a native REPACK command that rewrites the table and hands unused bytes back to the OS, according to Certuvia. A concurrent variant uses logical decoding to capture writes that happen during the rewrite and takes an access-exclusive lock only for the final swap, so other sessions keep working until the last moment. The command requires the MAINTAIN privilege on the table, and it can also physically reorder a table by a given index, standing in for CLUSTER.
For comparison, the older path on PostgreSQL 18 was the blocking VACUUM (FULL); a non-blocking rewrite required the separately installed pg_repack extension.
Autovacuum gains priority scores and parallel index work
Autovacuum now prioritizes tables using scores. The new pg_stat_autovacuum_scores view exposes per-table values, and the score weights are configurable settings. Parallel index maintenance is controlled by autovacuum_max_parallel_workers, a server-wide allowance, alongside autovacuum_parallel_workers, a per-table setting. PostgreSQL 19 can also mark eligible pages all-visible during ordinary scans, which improves future index-only scans.
Certuvia notes there is no setting that faithfully restores the PostgreSQL 18 scheduler, so scheduling comparisons need to be made on separate installations.
Asking the planner for advice
Two new components, pg_plan_advice and pg_stash_advice, generate explanations of planner choices and let you constrain specific choices within a query — for example requesting a sequential scan for a named table. Stored advice is keyed by query identifier and reused automatically. This is narrower than the traditional approach of setting options such as enable_indexscan off, which rules out an entire class of plans everywhere rather than one table in one query.
Two caveats from the tour: advice constrains the normal planner, and it can go stale as data changes. An administrator enables the module with LOAD 'pg_plan_advice' or configures preloading.
Replication shown on real servers
The walkthrough also starts additional PostgreSQL instances on demand — a logical subscriber on port 5433 and a physical standby on port 5434, both fed by the primary on 5432 — and follows a single row and a counter from source to destination. To fit the sandbox's memory budget, only one of the two extra instances runs at a time, and each replication exercise stops the other.
Run it yourself
Everything executes on a real PostgreSQL 19 server inside a disposable guest, under a non-administrative role with a dedicated demo database. Sidenotes offer the older SQL or a setting that disables a particular optimization, so readers can see the difference in behaviour between releases. Certuvia cautions that these comparisons are not benchmarks: any timing claim requires running the same workload on actual 18 and 19 servers with equal data, settings, cache conditions and hardware.
Why it matters
REPACK closes a long-standing operational gap — reclaiming disk from bloated tables previously meant a blocking rewrite or a third-party extension. Score-driven autovacuum and parallel index work target one of the most common sources of production pain in busy deployments. Planner advice offers finer control than global planner settings, useful for debugging slow queries or pinning down specific choices. Combined with the new SQL conveniences and replication changes, these give teams concrete reasons to plan an upgrade, and a runnable tour makes evaluating them unusually cheap.
- #postgresql
- #databases
- #sql
- #open-source
- #release-notes