科技开发者工具重大

PostgreSQL 19 is out, with REPACK (CONCURRENTLY), plan advice and JIT disabled by default

The PostgreSQL Global Development Group released version 19 today. It adds non-blocking table repacking, a way to pin query plans and read-your-writes on standbys, and ships compatibility changes that need checking before an upgrade.

Promptea Editorial阅读约3分钟

The PostgreSQL Global Development Group announced the release of PostgreSQL 19 today, November 19, 2026. The release notes in the official documentation list the same release date. Both sources used here are the project's own: the release announcement and the version 19 release notes. No independent coverage was available at the time of writing.

What changes for people who build with it

The headline feature is a new REPACK command. According to the announcement, it reclaims space left by updates and deletes and can reorder a table to match an index, and REPACK (CONCURRENTLY) does so without blocking reads or writes. The project says REPACK replaces VACUUM FULL and CLUSTER, which remain available for compatibility.

For query performance, the new pg_plan_advice extension lets users stabilize planner choices and try alternative plans through a "plan advice" mini-language. The companion pg_stash_advice extension stores advice and applies it automatically by query identifier, which the announcement describes as a way to fix a slow plan without changing the application.

  • Read-your-writes on standbys: a session on a standby can run WAIT FOR LSN to wait until the standby has replayed WAL up to a given log sequence number before querying.
  • INSERT ... ON CONFLICT DO SELECT lets RETURNING return existing conflicting rows, which the project presents as a simpler "get or create" that saves a network round trip.
  • COPY can output JSON, including a single JSON array, and the SQL/JSON path language gains string methods such as lower(), upper(), replace(), split_part() and btrim().
  • Logical replication no longer needs a restart to be enabled when wal_level is set to replica: the effective WAL level is raised when the first logical replication slot is created. Sequence values can now be replicated with FOR ALL SEQUENCES.
  • Autovacuum can vacuum indexes with parallel workers, controlled by autovacuum_max_parallel_workers, and uses a new scoring system to prioritize tables.

On performance, the announcement says faster foreign key checks made bulk inserts "nearly 2x faster" in testing. That figure is the project's own and comes without published benchmark details. The number of asynchronous I/O workers is now adjusted automatically between io_min_workers and io_max_workers, which replace io_workers.

What to check before upgrading

The release notes list several incompatibilities. JIT is now disabled by default because, in the project's words, its costing "has been determined to be unreliable"; sites running many large analytical queries need to enable it manually. RADIUS authentication support is removed. A warning is now issued after successful MD5 password authentication, and the announcement says MD5 will be removed in a future release and recommends SCRAM.

  • standard_conforming_strings is now always on; dumps made with pre-19 pg_dump or pg_dumpall using standard_conforming_strings = off will not load properly.
  • The default of max_locks_per_transaction changes from 64 to 128, and the notes say settings must effectively be doubled to match their previous capacity.
  • A json_array() call that returns no rows now returns an empty JSON array instead of NULL.
  • pg_upgrade refuses clusters with btree_gist inet/cidr indexes or with carriage returns or line feeds in database, role or tablespace names.

As with every major version, migrating data requires pg_dumpall, pg_upgrade or logical replication. The announcement does not say when managed database providers will offer PostgreSQL 19.

为什么重要

  • PostgreSQL sits under a large share of web and AI application backends, so the defaults that change here (JIT off, max_locks_per_transaction doubled, MD5 warnings) will reach many production systems as they upgrade.
  • WAIT FOR LSN and ON CONFLICT DO SELECT remove workarounds that applications using read replicas or get-or-create logic have had to build themselves.
  • Some changes break existing setups outright, such as the removal of RADIUS and the always-on standard_conforming_strings, so upgrades need a compatibility review rather than a version bump.

要点

  • PostgreSQL 19 was released on 2026-11-19 by the PostgreSQL Global Development Group.
  • REPACK (CONCURRENTLY) reclaims table bloat without blocking reads or writes; pg_plan_advice and pg_stash_advice let users pin query plans.
  • JIT is disabled by default, RADIUS is removed and standard_conforming_strings is always on.
  • The "nearly 2x faster" bulk insert figure is the project's own testing; no independent benchmarks were available yet.

来源

  1. PostgreSQL Global Development Group一手来源
    PostgreSQL 19 Released!
    postgresql.org
  2. PostgreSQL Global Development Group一手来源
    PostgreSQL 19 Documentation: E.1. Release 19
    postgresql.org

我们如何选择和核实来源

标签:
  • postgresql
  • databases
  • open-source
  • release
公司:
  • PostgreSQL Global Development Group
PostgreSQL 19 released: REPACK, plan advice, JIT off by default · Promptea