Skip to content
  1. Planet PostgreSQLGuides & Cases

    Deepak Mahto: Exploring PostgreSQL 19 – Part 2: SELECT expression INTO in PL/pgSQL

    PostgreSQL 19 closes the performance gap between SELECT expr INTO v and v := expr in PL/pgSQL, which was roughly 5x slower before. A 1,000,000-iteration benchmark on PostgreSQL 18 took 201.

    Brief · Based on the source excerpt

    Test conditionsMigrated Oracle and SQL Server PL/pgSQL code gains speed without rewrites; after upgrading to PostgreSQL 19, re-benchmark loop-heavy procedures that rely on SELECT ... INTO.

  2. Planet PostgreSQLGuides & Cases

    PostgreSQL 19 REPACK (CONCURRENTLY) in Practice: Reads and Writes Continue, but the Final Swap Still Waits on Locks

    PostgreSQL 19's REPACK (CONCURRENTLY) allowed reads and writes during the main rewrite, but the final table swap had to wait for an open read transaction to release its lock, so the operation is not fully lock-free. In the test, a regular VACUUM left the table at 70 MB while REPACK reduced it to 14 MB.

    Brief · Based on the source excerpt

    Why It MattersUse REPACK (CONCURRENTLY) to reclaim disk space from bloated tables without a full outage, but budget for the final ACCESS EXCLUSIVE swap and avoid long-running transactions; validate in a test database first.

  3. select * from depesz;Guides & Cases

    How PostgreSQL 19 Handles INSERT … ON CONFLICT DO SELECT

    PostgreSQL 19’s INSERT … ON CONFLICT DO SELECT inserts new rows or returns existing ones on conflict without a no-op update. It requires RETURNING and supports optional row locking. When locking is requested, conflicting rows filtered out by WHERE are still locked.

    Why It MattersWhen replacing no-op updates in get-or-create code, check whether the old primary key is null to identify inserts, since the command tag counts returned rows.

  4. select * from depesz;Guides & Cases

    Testing PostgreSQL 19’s Slot-Driven Logical Decoding

    Tests show PostgreSQL 19 enables logical decoding without a restart when the first logical slot is created with wal_level=replica. The checkpointer reverts to replica asynchronously after the last slot is dropped or invalidated. effective_wal_level shows the current level.

    Why It MattersEnabling logical decoding for on demand CDC no longer requires a restart, but leftover valid logical slots can keep the extra WAL overhead in place.

  5. Percona PostgreSQL BlogGuides & Cases

    PostgreSQL 19 WAIT FOR LSN: How to Read Your Writes on an Async Standby

    A PostgreSQL 19.0 demo shows how WAIT FOR LSN lets an async standby serve reads of just-committed writes. With replay paused, primary writes continued and standby_replay timed out after about 2 seconds, while standby_flush confirmed WAL was durable on the standby.

    Why It MattersIf only some requests need to read their own writes from a standby, applications can wait selectively but must decide whether to retry or read from the primary on timeout.

  6. Planet PostgreSQLPerspectives

    What PostgreSQL 19 Changes for Existing SQL

    Dimitri Fontaine compares real queries on PostgreSQL 19.0 and 18.6 with the final release notes, covering 11 changes affecting existing SQL, about 20 new features, and an 8-step upgrade checklist. The article highlights planner rewrites that now use NOT NULL constraints.

    Brief · Based on the source excerpt

    Why It MattersUsing real queries on PostgreSQL 19.0 and 18.6, the article focuses on SQL compatibility changes and upgrade checks, especially planner rewrites based on NOT NULL constraints.

  7. Percona PostgreSQL BlogGuides & Cases

    How PostgreSQL 19’s WAIT FOR LSN Can Replace Synchronous Replication

    PostgreSQL 19’s WAIT FOR LSN lets apps wait after commit for a standby flush or replay, for durability on both servers or read-your-writes. A timeout leaves the outcome unknown. Percona’s author recommends waiting for 19.1 before production use because 19.0 lacks a critical fix.

    Why It MattersWaiting on demand keeps standby outages from stalling primary commits, but standby connection pools need capacity for sessions held open while they wait.

  8. Planet PostgreSQLPerspectives

    How PostgreSQL 19’s WAIT FOR LSN Offers an Alternative to Synchronous Replication

    PostgreSQL 19’s WAIT FOR LSN lets applications choose when and where to wait for an LSN to reach a standby so replica reads can see recent writes. The author recommends waiting for PostgreSQL 19.1 before production use because 19.0 lacks a critical fix.

    Brief · Based on the source excerpt

    Why It MattersApplications that need to read their own writes from a replica can wait for WAL on demand rather than making every commit wait for a standby to satisfy that read requirement.

  9. Planet PostgreSQLGuides & Cases

    PostgreSQL 19 Developer Guide: Returning Existing Rows with INSERT ON CONFLICT DO SELECT

    PostgreSQL 19’s INSERT … ON CONFLICT DO SELECT returns the existing row on a unique key conflict. A registration example shows why DO NOTHING RETURNING yields no row on conflict and why DO UPDATE returns one only by rewriting it.

    Brief · Based on the source excerpt

    Why It MattersFor get or create operations keyed by a unique value, returning the existing row on conflict avoids both an extra database round trip and a rewrite just to retrieve the row.

  10. Lobste.rs DatabasesPerspectives

    A fork(2) in the road: does a new database have room after Postgres 19's reverts?

    After a wave of reverts in Postgres 19, the article argues PostgreSQL's yearly release cycle means reverted features get no another chance until September 2027 at the earliest, and consensus decision-making makes large changes nearly impossible to land.

    Why It MattersLong-term PostgreSQL roadmaps should account for annual release cadence and consensus-driven feature turnaround delays.

  11. Hacker News PostgreSQLGuides & Cases

    What Changes When You Upgrade from PostgreSQL 18 to 19

    In PostgreSQL 18.6 vs 19.0 tests, median time fell from 202.0 to 119.0 ms for a 100,000-row foreign-key insert and from 51.1 to 38.6 ms for NOT IN counting 250,000 missing IDs. Native REPACK (CONCURRENTLY) allows reads and writes during the rewrite but needs an ACCESS EXCLUSIVE lock for the final swap.

    Why It MattersNative concurrent REPACK can replace some scheduled pg_repack jobs, but the decision depends on how long the final swap waits for an exclusive lock under production traffic.

  12. Lobste.rs DatabasesGuides & Cases

    ClickHouse Tests PostgreSQL 19 pg_plan_advice and Its Hazards

    ClickHouse tests PostgreSQL 19’s pg_plan_advice and pg_stash_advice on ClickHouse Managed Postgres, using scan and JOIN-order hints to address planner misestimates.

    Why It MattersUsing ClickHouse Managed Postgres tests, the article shows where PostgreSQL 19 plan advice helps and how stale or poor advice can degrade query performance.

  13. Planet PostgreSQLGuides & Cases

    How PostgreSQL Orders Memory Accesses with Barriers, Volatile, and Atomics

    Jan Kristof Nidzwetzki explains PostgreSQL's memory and compiler barrier macros such as pg_memory_barrier(), pg_write_barrier(), pg_read_barrier(), and pg_compiler_barrier(), and why they are needed to stop compiler and CPU reordering from breaking shared-memory code.

    Brief · Based on the source excerpt

    Why It MattersShared-memory code that has long worked on x86 can fail on ARM, so its ordering assumptions need to be checked against the target platform’s memory model.

  14. CYBERTEC PostgreSQL BlogGuides & Cases

    How to Deal with Slow Shutdown in PostgreSQL

    Laurenz Albe explains why PostgreSQL shutdown can be slow: a clean shutdown runs a checkpoint that flushes dirty shared buffers to disk, so larger shared_buffers and more dirty pages mean longer shutdown.

    Why It MattersFor PostgreSQL instances needing fast restarts, an explicit CHECKPOINT before shutdown shortens downtime; with large UNLOGGED tables you must use FLUSH_UNLOGGED (v19+) or the FILE_COPY database trick, or shutdown stays slow.

  15. Hussein NasserPerspectives
  16. Planet PostgreSQLPerspectives

    PostgreSQL 19 vs 18: Native REPACK and Production Upgrade Guide

    The article compares PostgreSQL 19 and 18 across operations, SQL, and defaults, highlighting native REPACK (CONCURRENTLY), pg_plan_advice, `INSERT .

    Brief · Based on the source excerpt

    Why It MattersThe guide examines PostgreSQL 18-to-19 operational trade-offs, focusing on native REPACK, autovacuum changes, and configuration checks required before production upgrades.

  17. Hacker News PostgreSQLReleases

    PostgreSQL 19 Released with REPACK and Parallel Autovacuum

    PostgreSQL 19 was released on 2026-11-19 with the new REPACK command, parallel autovacuum, automatic I/O worker scaling, logical replication of sequence values, and the WAIT command for standby read-your-writes consistency.

    Why It MattersPostgreSQL 19 adds parallel autovacuum, automatic I/O worker scaling, and REPACK while introducing compatibility changes that require careful migration and configuration review.

  18. Planet PostgreSQLPerspectives

    Zsolt Parragi: What's left in Postgres 19

    PostgreSQL 19 has finally been released after multiple delays. Zsolt Parragi highlights some of the more interesting additions that remain in the release, noting that the list of reverted features is long and that the post is not a complete list.

    Brief · Based on the source excerpt

    Why It MattersThe post offers a quick look at selected additions that survived the reverts, while the full release notes are the reference for upgrade planning.

  19. Postgres.fmPerspectives

    Postgres.fm Reviews PostgreSQL 19 Features and Upgrade Checks

    Postgres. fm covers PostgreSQL 19’s release timing, notable features, and upgrade checks, including REPACK (CONCURRENTLY), scaled LISTEN/NOTIFY, autovacuum prioritization, planner advice, WAIT FOR LSN, and new defaults.

    Why It MattersUse the episode’s synthetic tests to choose upgrade checks, then test plan changes and new defaults on your own workload rather than treating the results as production forecasts.

  20. EDB PostgreSQL BlogReleases

    How REPACK (CONCURRENTLY) Entered PostgreSQL 19 Core

    Álvaro Herrera, who was involved in bringing pg_squeeze functionality into core PostgreSQL, recounts the backstory of REPACK (CONCURRENTLY), which shipped with the latest release.

    Brief · Based on the source excerpt

    Why It MattersÁlvaro Herrera recounts how pg_squeeze functionality led to REPACK (CONCURRENTLY) entering PostgreSQL core, providing context on the feature’s evolution.

Earlier updates →