PostgreSQL 19 reaches GA and is available on Databricks Lakebase the same day

PostgreSQL 19 reaches GA and is available on Databricks Lakebase the same day

Databricks announced on its blog that PostgreSQL 19 reached general availability and is already available on Lakebase, its managed Postgres service. The company says new major versions often take weeks to reach other managed PostgreSQL services, and it wanted customers to have this one the same day. It adds that several engineers on the Lakebase team are PostgreSQL committers and contributors who worked on the release directly, on areas from query plan advice to shared memory, locale handling and release management. To try it, you create a new Lakebase project and pick PostgreSQL 19 as the version.

The post calls 19 a practical release. There is, in its words, no single headline feature that changes what PostgreSQL is. Instead the release goes after operational problems database teams know well: bloated tables, unstable query plans, replica lag, incomplete statistics, and maintenance that is hard to run safely in production. The common thread, it says, is control.

REPACK is the first feature covered. Because of multiversion concurrency control, an UPDATE creates a new row version and a DELETE leaves a dead tuple. Vacuuming makes the space reusable but does not necessarily return it to the operating system or restore a useful physical row order, so heavily updated tables can bloat. The usual fixes were VACUUM FULL, CLUSTER or the external pg_repack tool; the built-in commands hold an ACCESS EXCLUSIVE lock for the whole operation. REPACK reclaims space like VACUUM FULL, and with USING INDEX it also orders rows like CLUSTER. With CONCURRENTLY, PostgreSQL rebuilds the table while normal reads and writes continue, capturing ongoing changes through logical decoding. It then takes an ACCESS EXCLUSIVE lock to apply the remaining captured changes and swap the new table and index files into place. That phase is typically brief but can take longer on a busy table.

The constraints are real. Concurrent repacking uses an extra replication slot, so it needs free capacity under max_repack_replication_slots and a table with a non-deferrable primary key or a suitable index-based replica identity. It needs temporary disk space for a copy of the table and all its indexes, possibly plus a sort file up to the size of the table. In the current upstream PostgreSQL 19 implementation it fails if more than about 104 million tuples in the target table are updated or deleted while REPACK (CONCURRENTLY) runs; this counts changes made during the repack, not rows already in the table. Not every relation type is eligible, long-running transactions can delay the final lock, and concurrent repacking is not MVCC-safe: after it commits, transactions using snapshots taken before the repack began can see the table as empty. Physical clustering also degrades as later writes arrive.

The second theme is query plans. Per-table statistics cannot capture cross-table correlations. The post's hypothetical: enterprise customers are 0.1% of customers but generate 30% of orders. With an index on orders.customer_id, the planner may expect few orders per enterprise customer and pick a nested loop, when a hash join would suit the real distribution. PostgreSQL 19 adds pg_plan_advice, which describes planner decisions as advice, applies supplied advice and reports whether it was followed, and pg_stash_advice, which stores advice by query ID and applies it automatically when a matching query is planned. They add no cross-table statistics and do not replace the planner; they let you intervene when a bad estimate yields a poor plan. EXPLAIN feedback of matched means the plan complies with the advice, not that it is better, so it still needs testing against the real workload. Unlike inline optimizer hints, the advice lives outside the query text. The workflow: inspect the plan, test focused advice, create the extension in each database, create a stash tied to the query ID from EXPLAIN (VERBOSE), and configure the database to use the stash for new connections. The post advises treating advice as a stabilizer once the problem is diagnosed, since data distributions change, cached prepared statements may keep an older plan for a while, and the optimizer is still right more often than wrong.

Maintenance and observability improve too. Autovacuum can use parallel workers when vacuuming indexes, controlled by autovacuum_max_parallel_workers, and a new scoring system prioritizes tables by how urgently they need vacuuming or analysis. New views are pg_stat_lock (statistics by lock type), pg_stat_recovery (recovery status) and pg_stat_autovacuum_scores (how autovacuum prioritizes tables). EXPLAIN (ANALYZE, IO) reports asynchronous I/O activity, and auto_explain.log_io can add it to logged plans. Bytes written for full-page images now show in pg_stat_wal, EXPLAIN (ANALYZE, WAL) and vacuum and analyze logs.

On logical replication, the post says 19 closes several long-standing gaps. Creating the first valid logical replication slot raises effective_wal_level to logical even when wal_level is replica. Publications can use FOR ALL SEQUENCES, and CREATE PUBLICATION ... FOR ALL TABLES EXCEPT (...) publishes everything but a named set. A subscription can take its connection from a postgres_fdw server with CREATE SUBSCRIPTION ... SERVER. The retain_dead_tuples subscription option keeps enough information to detect update_deleted conflicts, where a replicated update targets a row deleted by another origin; this also needs track_commit_timestamp on the subscriber, and pg_stat_subscription_stats counts the conflicts. Sequence synchronization removes a migration edge case: copying rows without advancing sequences can leave a promoted subscriber generating values that already exist. Initial sequence values are copied when a subscription is created with copy_data = true, the default, but later changes are not streamed, so they should be refreshed right before cutover. If the publication has gained new sequences, ALTER SUBSCRIPTION ... REFRESH PUBLICATION adds them.

For read replicas, WAIT FOR LSN blocks the standby until replay reaches at least a requested WAL position, which fixes the case where a client writes to the primary and immediately reads a replica that has not caught up. By default it waits indefinitely for replay; other modes wait for WAL to be written or flushed, and a timeout can be set. The client or connection pooler still has to carry the LSN from primary to replica, but polling and arbitrary sleeps are no longer needed.

For foreign data wrappers, postgres_fdw can import statistics from the remote server during ANALYZE. If the import fails it falls back to row sampling, so the remote statistics need to be current. With them the planner can estimate row counts better and may choose a hash join over a nested loop.

Smaller changes: INSERT ... ON CONFLICT DO SELECT gives a get-or-create pattern that returns both existing and new rows, replacing the DO UPDATE SET col = EXCLUDED.col workaround that creates a new row version and a dead tuple on every conflict. COPY TO can emit JSON, one object per line by default or a single array with FORCE_ARRAY; the format is export-only and COPY FROM does not accept it. The random(min, max) family now supports date, timestamp and timestamptz. With io_method = worker, I/O workers scale automatically between io_min_workers and io_max_workers, foreign-key checks are faster, and the planner and executor get further targeted optimizations.

The post also lists features that landed during development but were pulled before release because reviewers found correctness or design problems too risky to fix late, so they wait for a later release. SQL/PGQ property graph queries (CREATE PROPERTY GRAPH and GRAPH_TABLE) were reverted on September 7, 2026. UPDATE and DELETE ... FOR PORTION OF, temporal changes that split rows to preserve history outside the targeted time range, were reverted on September 15, 2026.

Key facts

  • Databricks says PostgreSQL 19 reached GA and is available on Lakebase the same day; you pick PostgreSQL 19 when creating a new Lakebase project.
  • REPACK (CONCURRENTLY) rebuilds bloated tables while reads and writes continue, but needs a primary key or suitable replica identity, spare disk for a table copy, and currently fails past about 104 million updated or deleted tuples during the run.
  • pg_plan_advice and pg_stash_advice let you steer a bad plan and store the advice by query ID, without adding cross-table statistics.
  • WAIT FOR LSN lets a standby block until it has replayed a given WAL position, supporting read-your-writes on replicas; the client or pooler must still carry the LSN.
  • SQL/PGQ property graph queries (reverted September 7, 2026) and FOR PORTION OF (reverted September 15, 2026) were pulled before release.

Why it matters

The post frames PostgreSQL 19 as a release with no single headline feature, aimed at operational pain: bloated tables, unstable plans, replica lag, missing statistics and risky maintenance. The biggest practical change is REPACK, which brings online table rebuilds into core where VACUUM FULL and CLUSTER hold an ACCESS EXCLUSIVE lock for the whole run. Databricks also stresses speed of access: it says new major versions often take weeks to reach other managed PostgreSQL services, while Lakebase offered 19 on the day of GA.

Who it affects

Database teams that run large, heavily updated tables will look at REPACK and the parallel, scored autovacuum. Teams with a bad plan on a critical query get a supported way to pin it. Applications that read from asynchronous replicas can use WAIT FOR LSN. People who move data with logical replication, for CDC, migrations or major-version upgrades, get sequence synchronization, FOR ALL TABLES EXCEPT and update_deleted conflict detection. Users of postgres_fdw get remote statistics import. Lakebase customers can select the new version directly.

How to use it

On Lakebase, create a new project and choose PostgreSQL 19 as the version. For REPACK, run it with CONCURRENTLY, and add USING INDEX to order rows by an existing index; check free slots under max_repack_replication_slots and disk space first. For plan advice, inspect the plan, test focused advice, create the pg_stash_advice extension in each database, stash the advice under the query ID from EXPLAIN (VERBOSE), and configure the database to use the stash for new connections. For sequences in a logical-replication cutover, refresh them just before switching, and use ALTER SUBSCRIPTION ... REFRESH PUBLICATION if the publication gained new sequences.

How solid is it

This is a vendor blog from Databricks, so the Lakebase availability claim comes from the company itself. The post links the PostgreSQL 19 release notes for the full list of changes. The post gives no benchmarks or performance figures for REPACK, parallel autovacuum or other features. The 0.1% and 30% enterprise-customer numbers are an illustrative example, not measured data. The article text available here is cut off in the section on features removed before release.

Risks and caveats

REPACK CONCURRENTLY still needs planning. It requires a non-deferrable primary key or suitable index-based replica identity, an extra replication slot, and temporary disk space for a table and index copy, plus possibly a sort file as large as the table. It currently fails if more than about 104 million tuples are updated or deleted in the target table during the run. Long-running transactions can delay the final lock, not every relation type is eligible, and the operation is not MVCC-safe: snapshots from before the repack can see the table as empty afterward. Clustering also degrades as new writes arrive. Plan advice does not make a plan better by itself; a matched result only means the plan complies, so test against the real workload. WAIT FOR LSN waits indefinitely by default, and postgres_fdw statistics import falls back to row sampling if it fails.

“There is no single headline feature that changes what PostgreSQL is.”

— Databricks, Lakebase blog post on PostgreSQL 19