DatabricksSavannah LongoriaAnnouncement
PostgreSQL 19 is available on Lakebase
Summary
PostgreSQL 19 reached GA and is available on Lakebase the same day, with contributions from Lakebase engineers who are PostgreSQL committers. The release targets operational problems such as table bloat, unstable query plans, and incomplete statistics. REPACK allows concurrent table rebuilding without blocking normal reads and writes during most of the operation, using logical decoding to capture ongoing changes. New query plan advice functions, pg_plan_advice and pg_stash_advice, let administrators intervene when the optimizer produces poor plans without modifying application query text. Logical replication gains online activation of logical decoding, sequence synchronization, and the ability to exclude specific tables from a publication.
Context
PostgreSQL 19 is a new major release focused on operational improvements for database teams, including bloated tables, unstable query plans, replica lag, and incomplete statistics. It is available on Lakebase on the same day as the GA release.
Approach / What changed
PostgreSQL 19 introduces REPACK for concurrent table rebuilding, pg_plan_advice and pg_stash_advice for query plan stabilization, parallel autovacuum, new statistics views, and logical replication improvements such as online activation of logical decoding and sequence synchronization.
Takeaways
REPACK CONCURRENTLY reclaims space and reorders rows while normal reads and writes continue, using logical decoding to capture changes during the rebuild.
pg_plan_advice and pg_stash_advice let you stabilize a query plan by applying advice outside the application’s query text, without inline optimizer hints.
Logical replication in PostgreSQL 19 can be activated without a restart when wal_level is replica, and supports sequence synchronization and FOR ALL SEQUENCES publications.
FAQ
How does REPACK CONCURRENTLY avoid downtime?
REPACK CONCURRENTLY rebuilds a table while normal reads and writes continue during most of the operation, using logical decoding to capture ongoing changes. It then takes a brief ACCESS EXCLUSIVE lock to apply remaining changes and swap the new table and index files into place.
How do pg_plan_advice and pg_stash_advice work?
pg_plan_advice lets you supply advice to the planner for a specific query, and pg_stash_advice stores that advice by query ID so it is applied automatically when the matching query is planned. This allows you to stabilize a plan without modifying the application's query text.
What are the constraints of REPACK CONCURRENTLY?
REPACK CONCURRENTLY requires a non-deferrable primary key or suitable index-based replica identity, free capacity under max_repack_replication_slots, and temporary disk space for a copy of the table and its indexes. It fails if more than about 104 million tuples in the target table are updated or deleted while it runs.
Source and freshness
- Source
- databricks.com
- Published
- Added to Yomu
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.