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. Microsoft Azure Database for PostgreSQL BlogBenchmarks

    PostgreSQL 19 GIN VACUUM Tested Beyond Shared Buffer Capacity

    PostgreSQL 19 adds streaming reads for GIN VACUUM cleanup. On Azure Database for PostgreSQL with 16 GiB of shared_buffers, median cleanup speedups over 18.6 were 1.27x for a 21.30 GiB GIN index and 2.20x for a 26.62 GiB index. Smaller indexes finished in under a second.

    Brief · Based on the source excerpt

    Why It MattersWhen assessing PostgreSQL 19’s GIN cleanup gains, whether the index fits in shared buffers is more informative than table row count alone.

  5. Planet PostgreSQLGuides & Cases

    Routine OS Patching Broke PostgreSQL Backups by Mismatching pgBackRest Versions

    Routine OS patching upgraded pgBackRest on the production PostgreSQL server from 2.55.1 to 2.59.3 but left the backup server on 2.55.1, causing the next morning’s backup to fail. There was no downtime or data loss, but for several hours the newest backup was more than a day old.

    Brief · Based on the source excerpt

    Why It MattersWith a separate backup server, locking pgBackRest versions and checking both hosts after patching can reduce the risk of backup failure.

  6. 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.

  7. Neon BlogGuides & Cases

    Building a Software Factory on Neon

    Neon runs several agent pipelines that turn Slack requests, GitHub issues and alerts into reviewed PRs, keeping orchestrator state in Postgres and giving each request its own branch of the production database.

    Why It MattersIsolating each request in a branch of production and keeping process control in plain code lets agents change data without touching production or colliding; the cost is maintaining orchestrator state tables plus branch expiration and snapshot policies.

  8. Planet PostgreSQLGuides & Cases

    PostgreSQL 19 DBA Walkthrough, Part 2: Read Your Writes with WAIT FOR LSN

    A two-session psql walkthrough shows how PostgreSQL 19 uses WAIT FOR LSN to read your writes on an asynchronous standby. It captures the WAL insert LSN on the same primary connection after commit and also covers timeouts, monitoring waiters, and a stalled standby.

    Brief · Based on the source excerpt

    Why It MattersWhen reads from an asynchronous standby must reflect a just committed write, the application can wait before reporting success without adding that wait to the primary’s synchronous commit path.

  9. George FraserPerspectives

    AWS announced official support for distributed DuckDB through Athena, with Redshift support coming soon. The move adds AWS to a multi-vendor DuckDB ecosystem that already includes Fivetran's Lake Compute and MotherDuck.

    Why It MattersFor teams choosing an analytical database, DuckDB on Athena with Redshift to follow strengthens multi-vendor portability and reduces single-cloud lock-in, though self-hosting a DBMS remains unrealistic for most.

  10. Datadog DevelopersProducts & Tools
  11. Crunchy DataGuides & Cases

    Queries captured by pg_stat_statements can be re-run from psql by passing arguments with the \bind command when they are simple SELECT statements. Statements with IN lists don't work because pg_stat_statements collapses them; use EXPLAIN (GENERIC_PLAN) instead.

    Why It MattersThe approach works for parameterized replay of simple SELECTs sampled from pg_stat_statements; statements with IN lists must fall back to EXPLAIN (GENERIC_PLAN) since their parameters can't be matched.

  12. Lobste.rs DatabasesGuides & Cases

    Giving AI Agents Safe Access to PostgreSQL: Read-Only Roles, Temporary Credentials and Query Logging

    Restricting an AI agent to a read-only PostgreSQL role, read-only transactions or a read replica limits writes, but permissions are additive and PUBLIC grants can still allow updates.

    Why It MattersAdopting this requires automating credential provisioning and cleanup, and explicitly terminating existing sessions when access ends, since expired passwords do not close open connections.

  13. Planet PostgreSQLGuides & Cases

    Umair Shahid: How a 40 TB PostgreSQL Cutover Took One Night

    Umair Shahid recounts a regulated payments company's cutover of more than 40 TB of production data to a new EDB Postgres cluster, starting at 2 AM and back online by morning with all post-cutover validation checks confirmed in writing.

    Brief · Based on the source excerpt

    Why It MattersFor large migrations, size the timeline from the largest tables rather than total volume, and use replication against a live source to compress downtime into a single overnight cutover window.

  14. 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.

  15. 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.

  16. 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.

  17. Percona PostgreSQL BlogBenchmarks

    DBaaS Beyond the Hyperscalers, Part 2: PostgreSQL Performance on Scaleway, UpCloud, Vultr, OVHcloud and Exoscale

    Percona benchmarked managed PostgreSQL from Scaleway, UpCloud, Vultr, OVHcloud and Exoscale on identical 4 shared vCPU / 16 GB RAM plans using HammerDB TPC-C.

    Why It MattersMySQL scaling curves do not transfer to managed PostgreSQL: most providers' throughput flattens as concurrency rises, so sizing should follow provider-specific tests at the target concurrency and data size.

  18. 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.

  19. Microsoft Azure Database for PostgreSQL BlogProducts & Tools

    Azure HorizonDB previews customer-managed keys for encryption at rest

    Azure HorizonDB now offers a preview of customer-managed keys (CMK) for encryption at rest, letting users protect clusters with keys they own in Azure Key Vault.

    Brief · Based on the source excerpt

    Why It MattersThe encryption mode must be chosen at cluster creation and cannot be changed later; CMK adoption requires a same-region Key Vault, a 4,096-bit RSA/RSA-HSM key, and a user-assigned managed identity.

  20. Craig KerstiensPerspectives

    LLMs treating Postgres and SQLite as foundational will cement their position, but Postgres's deeper moat is its governance model, in which no single company is primary.

    QuotedBrandur@brandur

    Can see databases going one of two ways: - The institutional options become even more cemented as LLMs cargo cult Postgres and SQLite. - New databases appear that move at the speed of AI. Frequent features, rolling releases. It might seem crazy to ever leave Postgres, but what if a new DB fulfilled all your dreams for PG and then some: - Made major progress on problems like bloat. - Added built-in HA/multi-master. - Had daemonless mode so it could run like SQLite. - Offered reasonable OLAP performance. All areas so big that the PG consensus-driven model is going to have a hard time making progress on them. Wrote a couple words about it: t.co/pgoB4KP9Jw

    Why It MattersFor serious applications, governance structure matters as much as features: the more you depend on a single vendor's novel features, the higher the risk if that project fails.

  21. Y CombinatorPerspectives

    Supabase cofounders Paul Copplestone and Ant Wilson recounted the company's history on the How to Build the Future podcast, saying Supabase now oversees more than 50 million databases and deploys over a million new ones each week, 70% of which are created by AI agents.

    Why It MattersWith 70% of weekly new databases created by AI agents, AI-built software is becoming the main growth channel for Postgres backends like Supabase, pushing platforms to design for non-traditional builders.

  22. Planet PostgreSQLProducts & Tools

    Introducing the CloudNativePG Extensions Catalog

    Jeremy Schneider introduces the CloudNativePG Extensions Catalog, offering over a hundred extension images with inspectable SBOMs, rapid updates, a source-build framework, and a catalog website.

    Brief · Based on the source excerpt

    Why It MattersThe catalog adds an inspectable and automated delivery path for CloudNativePG extensions, while Debian base-image changes require locale/collation checks.

  23. Planet PostgreSQLPerspectives

    Jan Wieremjewicz: GTA VI and PostgreSQL 19 Shared a Release Day, but Not Freedom

    Jan Wieremjewicz contrasts PostgreSQL 19 and GTA VI reaching general availability on November 19, 2026. Both had been delayed and eagerly awaited by passionate communities, while the author reflects humorously on belonging to both audiences.

    Brief · Based on the source excerpt

    Why It MattersThe piece uses PostgreSQL 19 and GTA VI reaching general availability on the same day to offer a light comparison of release cycles and community expectations.

  24. Daily Dose of Data ScienceProducts & Tools

    NVIDIA released Auto Ontology, which drafts an ontology from database metadata for human certification so text-to-SQL agents map business terms to the right columns instead of returning wrong numbers.

    Why It MattersCertifying semantics before query generation can cut wrong-number answers in text-to-SQL, at the cost of human ontology certification and a Postgres-plus-pgvector dependency.

  25. 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.

  26. Planet PostgreSQLBenchmarks

    Hollis Varden: Upserts, Partitions, Triggers and String Matching on PostgreSQL 18

    Hollis Varden ran 21 small benchmarks on PostgreSQL 18. 6 built from source with default settings and C collation. On a 1,000,000-row table with 100,000 incoming rows (50,000 existing), `INSERT .

    Brief · Based on the source excerpt

    Why It MattersFiltering no-change upserts with IS DISTINCT FROM sharply reduces WAL volume, though the original still recorded 4.6 MB of WAL, so the optimization is not write-free.

  27. Hacker News PostgreSQLProducts & Tools

    Peat, a Fork of Neon's Serverless Postgres, Runs on PostgreSQL 18 and 19

    Peat is a fork of Neon's open-source serverless Postgres that keeps its storage engine on PostgreSQL 18 and 19 and adds a Kubernetes operator to install and run it.

    Why It MattersFor teams needing scale-to-zero, second-level branching and PITR, Peat keeps Neon's storage architecture current with PostgreSQL 18/19, though its alpha status and self-run operator are adoption caveats.

  28. Postgres.fmBenchmarks

    Postgres.fm Examines PGAIBench for Safe AI Changes to Production Postgres

    Postgres.fm examines PGAIBench v0.2, which tests 10 models across 19 scenarios on loaded two-node PostgreSQL 18.7 clusters. Models acting alone caused harm, while an offline replay of the AAA workflow blocked 12 of 13 harmful changes and approved 377 of 378 safe or unclassified changes.

    Why It MattersPGAIBench v0.2 combines real production-failure scenarios, loaded two-node clusters, and AAA controls to quantify the risks of letting AI modify production Postgres directly.

  29. 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.

  30. 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.

  31. Nik SamokhvalovProducts & Tools

    pgPrism is a tiny, embeddable PostgreSQL EXPLAIN plan visualizer that works anywhere with a single script tag. It has zero dependencies, is 37 KiB gzipped, shows BUFFERS first (blocks → bytes, e.

    Why It MattersWith zero dependencies and a 37 KiB gzipped footprint, teams can embed plan views and BUFFERS costs directly in docs and dashboards, lowering the barrier to EXPLAIN analysis on PostgreSQL 15–19.

  32. 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.

  33. NeonProducts & Tools

    On Lakebase Postgres, a read replica is not a physical clone of the machine as in a monolith but another compute on the same storage. No data is copied, replicas are ready in seconds, autoscale, and can scale to zero.

    Why It MattersDecoupling replicas from storage means read scaling needs no data copy, is ready in seconds, and can scale to zero for spiky read workloads.

  34. Planet PostgreSQLGuides & Cases

    Umair Shahid: Where 39% of the WAL Came From

    Umair Shahid breaks down a Supabase customer case writing 1. 8 TB of WAL per day, where about 39% was full-page-image overhead caused by the five-minute checkpoint_timeout default.

    Brief · Based on the source excerpt

    Why It MattersFor workloads that frequently modify hot tables and indexes, check whether repeated checkpoints are inflating WAL through full-page images rather than disabling the full-page writes that protect against torn pages.

  35. 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.

  36. Planet PostgreSQLPerspectives

    Zsolt Parragi: The Numbers of Postgres 19

    Zsolt Parragi analyzes statistics from PostgreSQL 19's development cycle, drawing on hackorum.dev's new statistics pages covering per-release data and release-over-release comparisons. He focuses on how PG19 differed from previous releases and on how PostgreSQL development is changing rapidly even without this outlier.

    Brief · Based on the source excerpt

    Why It MattersWhen assessing changes in PostgreSQL development, separate PG19’s atypical cycle from trends that remain visible across other releases.

  37. Planet PostgreSQLGuides & Cases

    PostgreSQL 19 Plan Advice Tools for Transactional Outbox Workloads

    A lab using the transactional outbox pattern shows how changed data and stale statistics can lead PostgreSQL to choose an execution plan based on outdated information. It introduces PostgreSQL 19’s pg_plan_advice and pg_stash_advice, including generated advice for reproducing an index scan plan.

    Brief · Based on the source excerpt

    Why It MattersThe lab shows how stale statistics can mislead PostgreSQL’s planner on transactional outbox workloads and introduces PostgreSQL 19 tools for reproducing and stashing plan advice.