AI NewsInfrastructureAnnouncement

PostgreSQL 19 is out with REPACK CONCURRENTLY and plan-advice extensions

PostgreSQL 19 is out. REPACK CONCURRENTLY rebuilds a bloated table without blocking reads. Two new extensions let a DBA pin query plans without application changes.

AI News

Editorial2 min read

LinkedInX
Reveneau illustration standing in for a PostgreSQL 19 release photo

Why it mattersA team that today schedules downtime for VACUUM FULL can skip it. A DBA can pin a query's plan from the database side, outside the application code.

The PostgreSQL Global Development Group released version 19 on 19 November. A table can now be repacked while the application keeps writing to it. A DBA can pin the plan of one query without touching the application.

REPACK is the headline feature. Run it with the CONCURRENTLY option. PostgreSQL then reclaims bloated space, and can reorder rows to match an index. Reads and writes keep running against the table. The project says REPACK replaces most uses of VACUUM FULL and CLUSTER. Both of those take a full lock on the table.

Query plans a DBA can change without the application

Two new extensions come with 19: pg_plan_advice and pg_stash_advice. Together they let an administrator influence which plan the planner picks for a specific query. Each piece of advice is stored by query identifier. The application does not change. The project frames this as fixing a slow plan from outside the code that wrote the query.

Logical replication is simpler in 19. The server raises the WAL level to logical on its own when the first logical replication slot is created. This used to need a restart. Sequence values can now travel with logical replication. A publication can include every table and then EXCEPT a few.

Standbys get a command called WAIT FOR LSN. It pauses until the standby has replayed up to a given log sequence number. Then it runs the next query. This is read-your-writes for a replica. An application that writes on the primary and reads on the standby can wait for its own change to arrive.

Numbers and defaults that change

Jonathan Katz of the PostgreSQL core team said version 19 gives users new ways to manage workloads without disruption. The release notes say improved foreign key checks make bulk inserts nearly twice as fast.

Two defaults flip in this release. TOAST compression now uses lz4 when the build includes LZ4 support. Just-In-Time compilation is off by default. The project found its cost estimates were unreliable, and the notes recommend turning JIT back on for large analytical queries.

Authentication changes bite. PostgreSQL 19 prints a warning every time a user signs in with MD5. MD5 was deprecated in 18. The project says it will be removed in a future release. RADIUS authentication is already gone. The recommended replacement for password-based sign-in is SCRAM.

A team running 18 or older on a bloated hot table can plan a real test. REPACK runs on a copy of the data. The test is where a problem shows up, before any production run. The plan-advice extensions move a familiar workaround into the database itself. That workaround is editing application SQL to hint the planner. Who owns it changes in a shop that splits DBA work from application work.

Source

PostgreSQL 19 Released, via InfoQ.

This item was written by an AI system from the linked source. Reveneau is responsible for what it publishes.

Share
LinkedInX
Start a project