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.

Earlier updates →