PostgreSQL 19 Brings REPACK and Plan Advice to Managed Databases
Databricks added PostgreSQL 19 to Lakebase and Neon the day the community released it, bringing REPACK, pg_plan_advice and WAIT FOR LSN to managed Postgres on November 19, 2026.

Why it matters
- Databricks added PostgreSQL 19 to Lakebase and Neon on the day of the community release, dated November 19, 2026.
- REPACK rebuilds tables to reclaim space but still requires an exclusive lock to swap rebuilt files into place.
- pg_plan_advice and pg_stash_advice let operators stabilize execution plans without rewriting application code.
- WAIT FOR LSN lets applications wait for a replica to reach a write-ahead log position before reading.
- Lakebase engineers contributed to upstream PostgreSQL 19 work on query-plan advice, shared memory and release management.
Databricks added PostgreSQL 19 to both Lakebase and Neon on the same day the PostgreSQL project released the new version, which the community announcement dates to November 19, 2026. That gives teams a managed path to the database release's new maintenance, query planning and replication tooling without running their own infrastructure. Databricks also says Lakebase engineers contributed to the upstream release, including work on query-plan advice, shared memory and release management.
The story matters less for AI model capabilities than for the operational layer beneath them. PostgreSQL 19 introduces no new AI model and no new vector index. But operational databases sit behind the user-facing parts of most AI systems: they store conversation history, track jobs and permissions, record application events and serve calls that need predictable response times. For those teams, a database upgrade that makes infrastructure easier to maintain can matter more than a new feature in the application layer.
What does REPACK actually fix?
The headline addition in PostgreSQL 19 is REPACK, a command that rebuilds a table to reclaim unused space and can optionally reorder the data to match an index. The problem it addresses is well known to anyone running write-heavy workloads. PostgreSQL creates a new row version every time data changes. Routine vacuuming makes old space available for reuse, but it does not always shrink the underlying table on disk. A table storing frequently updated jobs or messages can keep occupying more space than its remaining live rows actually need.
REPACK's option lets ordinary reads and writes continue through most of the rebuild. That flexibility comes with a caveat the announcement does not bury. As Neon's release notes explain, PostgreSQL still needs an exclusive lock to finish swapping the rebuilt files into place. Teams should test the operation under a representative write load rather than assume the final lock is negligible on a busy table. In plain words: REPACK reduces disruption, but does not eliminate it.
How does pg_plan_advice stabilize queries?
The release also adds pg_plan_advice, an extension for testing and stabilizing execution plans (the database's chosen strategy for running a query), plus a companion pg_stash_advice extension that applies stored advice to a matching query. The planner ordinarily picks an execution plan based on the data and statistics available. When that choice changes, an operation that used to be fast can suddenly become slow.
The new tools give operators a way to investigate or mitigate that regression without immediately rewriting application code. That is a genuine operational win for teams whose agents and applications depend on consistent query latency. The advice itself carries a shelf life: any saved plan advice should be revisited as the data and workload evolve. The takeaway is that operators get a brake on planner regressions, not a permanent fix.
Why does replica timing matter?
PostgreSQL 19 also introduces WAIT FOR LSN, a command that lets an application wait for a database replica to reach a specified position in the write-ahead log (the database's sequential record of changes). With asynchronous replication, a write can succeed on the primary database before a replica has applied it. A user or agent that immediately reads from that replica may see an earlier state.
The failure mode is concrete. Suppose an application records approval for a task and immediately asks another service to read it from a replica. Without coordination, that read can miss the approval entirely. Waiting for the relevant log position lets the read see it. WAIT FOR LSN trades some waiting time for freshness when the workflow needs it, rather than assuming all replica reads are current. For multi-service AI pipelines that fan out reads, that is a correctness primitive, not a convenience.
What can teams try today?
Databricks' supported-versions documentation lists PostgreSQL 19 for Lakebase, and Neon's announcement explains how to choose it for a new project. Neither announcement says existing databases were automatically upgraded. Version availability, in other words, is a starting point rather than a migration.
For teams weighing a move, a disciplined test sequence is more useful than the release notes alone:
- Run representative queries against PostgreSQL 19 under realistic load.
- Confirm extension compatibility before planning any cutover.
- Measure replica lag to see whether WAIT FOR LSN is needed in your workflows.
- Rehearse the specific maintenance operations that prompted the upgrade, including REPACK under write pressure.
- Compare those results against current database behavior before switching production traffic.
That last step is the one most likely to be skipped, and the one most likely to catch the exclusive-lock cost of REPACK on a busy table.
The upstream contributions deserve weight in the assessment. Lakebase engineers worked on query-plan advice, shared memory and release management in PostgreSQL 19 itself, which suggests the managed offering tracks the community release closely rather than trailing it. Whether day-one availability translates into smooth production migrations is a separate question, and neither announcement addresses it. Teams that test under their own write loads before switching traffic will answer it for themselves.
Source: unite.ai
More from James Calloway
Show full bio
News editor covering people, launches and day-to-day practice in artificial intelligence and machine learning at AI In Context.
878 articles
Related articles
- Hitachi Vantara Update Lets VSP One Query Data In Place, Up to Five Times Faster
- Commvault and Databricks turn backed-up data into governed AI fuel
- Cohesity Expands Backup, Recovery and AI Data Access Across Microsoft Stack
- ClickHouse Acquires Xata and Expands Into Postgres, AI Tooling
- OpenAI Scales Unsharded PostgreSQL to 800 Million Users