Latest Blog Posts

All Your GUCs in a Row: enable_sort
Posted by Christophe Pettus in pgExperts on 2026-07-12 at 01:00
Disable `enable_sort` to fix a slow sort? Wrong target. Slow sorts need more `work_mem` or better indexes—not this GUC.

Postgres community events: isn't it time to tap the capabilities of the digital era?
Posted by Andrei Lepikhov in pgEdge on 2026-07-11 at 23:26

I've been going to conferences and meetups of all kinds since 2004. And today — much like in the era when a Nokia brick was giving people their first, still-primitive taste of mobility — these events follow the same format: you give a talk, you answer questions from the room, and the slides get posted somewhere. These days a video lands on YouTube too. Sometimes a chat survives the event, filled mostly with logistics. And that's about it.

I get it: the way humans interact and consume information doesn't really change, our analog bandwidth is limited, and the format — refined over centuries — is probably close to optimal. But why do we limit ourselves artificially and use almost none of what information technology has to offer?

Concretely, here's what I want to discuss.

Delays

For some mysterious reason, we still wait days, weeks, sometimes months for the slides and the video of a talk that matters to us. What stops organisers from publishing the slides before the talk starts, and the audio/video right after it ends? Editing isn't what makes a technical talk valuable — I can rewind to the right moment myself.

Access

Sure, people pay for tickets — but mostly for the chance to meet in person, argue, and soak up the atmosphere. The commercial upside of events like PGConf.dev or PGConf.EU is hardly the main point: they lean heavily on sponsors. And sponsors care about reach, not box office, don't they? So what stops us from streaming at least an audio feed from the nearest smartphone in real time and attaching the recording to the talk page the moment it ends? The community is international, and travel costs and visa formalities keep plenty of professionals away.

Interactivity

An on-site attendee can ask a question after the talk — or in the hallway track, over coffee, at an afterparty jogging. Spontaneous voice conversation is familiar, convenient, and important. But there are also people who don't think that fast on their feet, aren't that strong in face-to-face conversation, don't

[...]

(Belatedly) Announcing Release 21 of the PostgreSQL Buildfarm Client
Posted by Andrew Dunstan in EDB on 2026-07-11 at 13:34
 This release was made 9 days ago, but I just realized that I neglected to make a blog post about it. So, for the record, here is the announcement that went out via email.

I have released version 21 of the PostgreSQL Buildfarm Client

New features

  • PatchStack module — a new module for non-standard buildfarms that want to
    test a stack of patches on top of a branch. Note: this module is not for use with the
    regular community Buildfarm server - its use for builds reported there will be detected and rejected.
  • ABI check module — a new module that runs abidw to detect ABI changes in
    installed headers (passes --headers-dir and --drop-private-types for
    compatibility across abidw versions). Original author: Mankirat Singh, with
    additions from Tom Lane.
  • branches_target config keyrun_branches.pl can now use a dedicated
    target URL for fetching branches_of_interest.json instead of deriving it by
    regex-mangling the main target URL. Falls back to the old derivation when
    unset; the pgbuildfarm URL migration is applied to it as well.

Build system / meson

  • using_meson is now decided by the presence of meson.build rather than by
    branch name, so it works reliably with non-standard branch names.
  • Use the meson --buildtype option.

Non-standard / regex-matched branches

  • Skip the bf_ prefix when using regex-matched branches.
  • Fetch remote branches for regex checking in a saner way.
  • Handle cases where there is no usable symbolic HEAD (and suppress the
    resulting clone warnings).
  • Handle a missing remote HEAD when updating a mirror.

Cross-version upgrade

  • Compress pg_upgrade dump files
  • Stop testing upgrades from pre-v10 in v20 and higher.
  • Several pg_upgrade_output.d fixes, including relative-path logic and an
    output-collection bug.

Protocol

  • Adjust to ups
[...]

All Your GUCs in a Row: enable_seqscan
Posted by Christophe Pettus in pgExperts on 2026-07-11 at 01:00
enable_seqscan does not disable sequential scans. It cannot, and it was never meant to. The documentation says as much: sequential scans cannot be suppressed entirely, because sometimes reading the whole table is the only way to answer the query. What off actually does is tell the planner to avoi…

Ever Run Into A PostgreSQL Query That You Can Figure Out What It Does??
Posted by Dave Stokes on 2026-07-10 at 20:06

 Ever have a query 'tossed over the fence' that you find incomprehensible but still have to support it? A few years ago, you would have needed to triage the query. Obfuscated queries can be tough to decipher.  Sometimes, the query is due to someone or an ORM being clever. Many times the query is touch to read because the 

DBeaver recently added its AI Chat to the free, open-source DBeaver Community Edition. And you will find it very at determining what a query does. Let's start with a simple query.

Open AI Assistant


Where to find the AI Assistant









DBeaver 26.1.2's AI Assistant can be found on the main menu under 'AI'.

Input Prompt

Once you have the AI Assistant open, ask 'what does this do'?
Prompt with a query







Explanation

The AI will examine what you gave it and report back. I am using OpenAI with the gpt-4o engine. 
The Query Explained






































Hopefully, you were able to recognize this simple query, which reports the number of dead tuples. Okay, let us try something harder.

Seeing a query from a production server for the first time can be humbling. A CTE or two, a whole bunch of joins, and a Window Function combined can make quite a head scratcher. 

What does this query do?

with film_revenue as (
    select
        f.film_id,
        f.title,
        c.name as category_name,
        count(r.rental_id) as rental_count,
        sum(p.amount) as total_revenue
    from
        public.film f
   
[...]

All Your GUCs in a Row: enable_self_join_elimination
Posted by Christophe Pettus in pgExperts on 2026-07-10 at 01:00
You are rarely the only thing writing your SQL. Your ORM writes some of it, your nested views write more, and sooner or later one of them joins a table to itself on its own primary key. That join returns exactly the rows it started with. enable_self_join_elimination is the PostgreSQL 18 optimizat…

The Version Number Is Not the Territory
Posted by Christophe Pettus in pgExperts on 2026-07-09 at 20:00
A PostgreSQL 14 database threw an error that PostgreSQL 14 cannot produce.

PostgreSQL, AI Governance, and the C.A.L.M. Platform Test
Posted by Vibhor Kumar on 2026-07-09 at 16:40
The C.A.L.M. Technical Framework for PostgreSQL AI Platforms Moving AI Governance from the Model Layer down to the Data Foundation When building AI applications, most organizations mistakenly attempt to enforce governance at the application or model layer. True, production-grade AI governance does not begin at the model layer—it begins where data becomes trusted enough for the model to matter. Below is the technical blueprint for the C.A.L.M. Framework, designed to resolve organizational friction and ground your AI strategy directly within your PostgreSQL data infrastructure. The Invisible Risk (The Friction Point) When data infrastructure is disconnected from AI orchestration, four organizational silos emerge, creating a fragile and unverified system: Data Engineering: Creates separate copies of data for speed, leading to unmanaged data sprawl. AI & Model Team: Assumes the underlying data is already pre-governed and secure. Platform Team: Focuses strictly on infrastructure uptime and database stability, ignoring logic shifts. Compliance Team: Builds governance policies without actual database-level verification. The Reality: Governance at the model layer without the data layer is just the appearance of governance. The Four Pillars of the C.A.L.M. Framework By centering your AI architecture around a Trusted Data Platform (PostgreSQL), you can resolve these friction points using four native technical pillars: 1. C — Changeability Focus: Evolving database schemas without generating unmanaged data sprawl. Core Mechanism: Logical Replication (CREATE PUBLICATION / SUBSCRIBE). Architectural Control: Isolates and decouples AI workloads cleanly without triggering application schema shifts or relying on fragile, manual data pipelines. 2. A — Assurance Focus: Row-level tracking and proving correct operations under strict audit conditions. Core Mechanism: Row Level Security (RLS) & pgAudit. Architectural Control: Explicitly isolates tenants via native database logic so application-side checks cannot be bypassed. This completely separates the Data Trace from the AI Trace. 3. L — Leverage Focus: Unifying operational relational data and vector context to minimize infrastructure sprawl. Core Mechanism: pgvector + Shared RLS Policies. Architectural Control: Vector embeddings automatically inherit existing structured table security policies, eliminating access divergence between disparate operational and vector systems. 4. M — Measurability Focus: Catching query drift or path bypasses before model failures manifest in production. Core Mechanism: pg_stat_statements & App-Level Logs. Architectural Control: Surfaces true SQL statements executing against tables to expose discrepancies and hidden behaviors within LLM orchestration frameworks.

A few months ago, I spent time with multiple teams inside the same large financial services organization.

I spoke with the data engineering team. The AI and model team. The platform team. The governance and compliance team.

Each conversation sounded right.

That was the problem.

Each team understood its domain. Each had a clear mandate. Each had a reasonable explanation for the choices it was making. Nothing sounded careless. Nothing sounded irresponsible.

But the real issue did not appear inside any one conversation. It became visible only when I looked across all four of them together.

The data engineering team had pulled customer data into a separate environment to support AI use cases. Faster to build. Safer to experiment. They did not want to touch core systems.

The AI team was building agents on top of that data — assuming it had already been governed, validated, and approved before it reached them.

The platform team was focused on infrastructure stability. AI-specific data governance was outside its current scope.

The compliance team was building a model governance framework. Access controls. Audit requirements. Approval workflows. Human review points.

Solid work. Built on one assumption nobody had verified: that the data underneath the models was already governed correctly.

Nobody had lied. Nobody had been careless. Each team was doing exactly what it believed it was supposed to do. But when I looked across all four conversations, the real risk became obvious.

The customer data grounding the AI agents existed in at least three separate copies across the organization. Each copy had been created independently, with slightly different field definitions, access controls, lineage, and freshness. None of them was the governed system of record.

The control said: “Only show this customer’s data to an authorized user.” The data layer replied: “Which copy? Governed by which access model? Created by which team? Refreshed when?”

That is where AI governanc

[...]

Waiting for PostgreSQL 20 – Add min() and max() aggregate support for uuid.
Posted by Hubert 'depesz' Lubaczewski on 2026-07-09 at 12:41
On 1st of July 2026, Masahiko Sawada committed patch: Add min() and max() aggregate support for uuid.   The uuid type already has a full set of comparison operators and a btree operator class, so it is totally ordered. min() and max() were the only common aggregates missing for it. Add the uuid_larger() and uuid_smaller() … Continue reading "Waiting for PostgreSQL 20 – Add min() and max() aggregate support for uuid."

EDB heads to PGConf.Brasil 2026, this is what we’ll be talking about!
Posted by Floor Drees in EDB on 2026-07-09 at 08:39
The Brazilian PostgreSQL community is gearing up for one of the most anticipated events of the year: PGConf.Brasil 2026. Taking place in the city of Blumenau from September 2 - 4, this year’s conference features no less than 13 sessions by EDB colleagues.

All Your GUCs in a Row: enable_presorted_aggregate
Posted by Christophe Pettus in pgExperts on 2026-07-09 at 01:00
enable_presorted_aggregate is on, it has been on since PostgreSQL 16 introduced it, and the single most useful thing you will ever do with it is turn it off for exactly one query. Default on, context user: settable per session, per role, per database, or inline in a single transaction. That last …

How to Achieve Pruning When Querying by Non-Partitioned Columns in PostgreSQL
Posted by Haki Benita on 2026-07-08 at 21:00

One of the most valuable things about partitioned tables is pruning - the database's ability to eliminate entire partitions based on a query predicate. Under conventional wisdom, pruning can only be achieved when querying by the partition key - this makes choosing the right key extremely difficult. However, if your data follows certain patterns, using some clever tricks you can achieve pruning even when filtering by non-partition key columns.

In this article, I demonstrate how to achieve partition pruning when filtering by non-partition key columns.

image by abstrakt design
image by abstrakt design
Table of Contents

Table Partition

Imagine you run a popular website with many users. Your product team wants to gain some insight into how the system is used, so you start logging events. To give events context, you group them into sessions and keep the time, the type, and some data in a database table:

db=# CREATE TABLE event (
  id         BIGINT GENERATED ALWAYS AS IDENTITY,
  timestamp  TIMESTAMPTZ NOT NULL,
  session_id BIGINT NOT NULL,
  type       TEXT NOT NULL,
  data       JSONB
) PARTITION BY RANGE (timestamp);

CREATE TABLE;

You have many users so you expect many events. Most queries use only a subset of the data, usually a specific date range, so you create a partition for each year based on the timestamp:

db=
[...]

All Your GUCs in a Row: enable_partitionwise_join
Posted by Christophe Pettus in pgExperts on 2026-07-08 at 01:00
Partitionwise join decomposes big joins into smaller per-partition pairs when both tables partition on the join key—but only if you enable it and meet strict…

Happy 30th Birthday, PostgreSQL
Posted by Ruohang Feng on 2026-07-08 at 00:00
On July 8, 1996, the PostgreSQL community picked up the flame from Postgres95. Thirty years later, it has grown from a Berkeley research project into a default foundation of the global database ecosystem.

PostgreSQL Disaster Recovery with pgBackRest TLS Transport
Posted by SHRIDHAR KHANAL in Stormatics on 2026-07-07 at 15:41

The backup node and DR server don’t need to share SSH keys. Here’s how pgBackRest’s native TLS transport provides certificate-authenticated restores and strict security isolation, making it the cleaner choice for isolated or large-scale recovery environments.

SSH Gets the Job Done Securely. TLS Can Help at Scale.

If you’ve read the pgBackRest DR guide on this blog, you already know the standard setup: two servers, passwordless SSH, pgBackRest pulling backups across the wire. It works reliably, and it’s what most teams run.

SSH works well for small deployments. The challenge emerges at scale: as the number of machines grows, managing individual key pairs, distributing them, rotating them, and auditing who has what becomes increasingly complex. SSH also supports host-based authentication, where host keys are used to authenticate connections in an Ident-like model, which simplifies certain setups. But, enforced key rotation across a large fleet remains genuinely difficult.

In essence, TLS works with the X.509 public key infrastructure to manage and verify public keys. Rather than pre-sharing them, the key owner can provide them embedded in a certificate that includes more information about who the key belongs to, the validity period, and so forth.  A certificate authority then signs the certificate. The receiver of the key only needs to know the certificate authority’s public key to verify it and then decide whether to trust it.

As a result, rather than pre-sharing keys to validate authentication, this allows fewer keys to be shared initially, thereby improving management at scale. That’s exactly the problem pgBackRest’s TLS server mode solves, although this now adds a new layer of systems to manage in the certificate authorities.

Security Isolation and Lateral Movement

Beyond scale, TLS mode also changes the access model more fundamentally. Unless explicitly restricted with a forced command

[...]

My Dishonest Benchmark
Posted by Mayur B. on 2026-07-07 at 07:21
How to Make PostgreSQL Look 100x Faster

The DeWitt Clause and the chilling of benchmark fights:
***************************************************

Database benchmarking used to be a full-contact sport.

In the early 1980s, researchers at the University of Wisconsin, including David DeWitt, worked on what became known as the Wisconsin Benchmark. Oracle’s numbers in the Wisconsin Benchmark were reportedly bad enough to anger Larry Ellison. According to DeWitt’s own telling, Ellison called the University of Wisconsin department chair and demanded that DeWitt be fired. DeWitt was not fired, but Oracle later added license language restricting publication of benchmark results without vendor approval. That style of restriction became known as the DeWitt clause.

Over time, similar benchmark-publication restrictions appeared across proprietary database licenses. The effect was predictable. Public, independent, comparative benchmarking became legally and socially more annoying. Researchers became more careful. Papers sometimes used anonymous labels like DBMS-X. Vendors got more control over when and how benchmark results appeared.

The tragedy is not that the old benchmark wars were pure. They were not. Vendors had every incentive to over-tune, cherry-pick hardware, choose workloads that loved their architecture, and compare a carefully tuned home system against a less carefully tuned rival.

But at least there was open combat. Bad claims could be challenged in public. Competitors, researchers, and practitioners could argue over the methodology instead of arguing first over whether the benchmark was even allowed to exist. Benchmarking was political, but it was not quiet.

The modern database benchmark ecosystem is often worse in a more boring way.

A vendor can publish a benchmark that is technically reproducible but strategically tilted:

  • tune i
[...]

All Your GUCs in a Row: enable_partitionwise_aggregate
Posted by Christophe Pettus in pgExperts on 2026-07-07 at 01:00
PostgreSQL's unusual enable_* parameter that defaults off: partitionwise aggregation trades memory for speed, and only you know if that deal is worth it for…

Waiting for PostgreSQL 20 – Add backend-level lock statistics
Posted by Hubert 'depesz' Lubaczewski on 2026-07-06 at 17:30
On 30th of June 2026, Michael Paquier committed patch: Add backend-level lock statistics   This commit adds per-backend lock statistics, providing the same information as pg_stat_lock. It is now possible to retrieve those stats (lock wait counts, wait times, and fast-path exceeded count) on a per-backend basis.   This data can be retrieved with a … Continue reading "Waiting for PostgreSQL 20 – Add backend-level lock statistics"

Replication Deadlock Bug in Current Postgres Releases 14-16
Posted by Michael Banck in credativ on 2026-07-06 at 15:30

Replication Deadlock Bug in Current Postgres Releases 14-16

The current minor releases of Postgres versions 14-16 (14.23, 15.18 and 16.14, released on May 14th) introduced a regression that can lead to a MultiXactOffsetSLRU deadlock during transaction log (WAL) replay in certain circumstances.

The bug was (to our knowledge) first reported in Bug#19490 on May 20th by Radim Marek from BoringSQL. Further reports were done on the pgsql-bugs and pgsql-admin mailing lists and we also got customer support requests through our Open-Source Support Center.

What is Currently Known About This Bug

The bug can be hit in two ways. First, during streaming replication where the standby eventually hangs due to the deadlock. The other possibility is hanging point-in-time-recovery (PITR). The following is currently known:

  1. The bug is only live on Postgres versions 14-16. Version 17 and 18 (and earlier versions) are not affected.

  2. The WAL needs to be generated by a leader running the Q4/2025 (November 13th) back-branch releases or earlier (14.20/15.15/16.11).

  3. The standby or the instance running PITR needs to be updated to the latest minor release (14.23/15.18/16.14).

  4. The startup process hangs with wait event LWLock/MultiXactOffsetSLRU in pg_stat_activity during WAL replay.

So to summarize, the leader needs to be at least a few minor versions behind and the standby needs to be updated to the latest minor version. Due to the recommended procedure of updating streaming standbys first before updating the leader, this bug is likely to be hit relatively often in the field, especially by organizations that only patch every few minor releases.

Circumventing the Issue

If one has not yet hit the issue, then not upgrading the standby or a PITR machine to the latest minor releases will avoid the problem. In the case that one is affected by the regression, there are three (well, currently two) ways to address the problem:

[...]

Inaugural PostgreSQL Istanbul Meetup was a blast!
Posted by Devrim GÜNDÜZ in EDB on 2026-07-06 at 14:53
We had our first meetup on Thursday, July 2nd, organized by the community people for the community people. Bilge Korkmaz Erdim, Gülçin Yıldırım Jelínek, and I had been working on the meetup idea for a long time, and it finally came together — hosted by Microsoft Turkey at their Levent office. A big thank you to Bilge for helping organize the venue, taking care of food and drinks, and being a great host.
Continue reading "Inaugural PostgreSQL Istanbul Meetup was a blast!"

CNPG Recipe 25 - Declarative Roles and Passwordless TLS in CloudNativePG 1.30
Posted by Gabriele Bartolini in EDB on 2026-07-06 at 08:56

CloudNativePG 1.30 introduces the DatabaseRole CRD and built-in TLS client certificate issuance, letting application teams own their PostgreSQL credentials declaratively and connect without ever handling a password.

Are You .ready?
Posted by Richard Yen on 2026-07-06 at 08:00

A practical guide to what .ready and .done mean, and why WAL sticks around

Introduction

It is 9:12 a.m. on a Monday. Someone on your team opens pg_wal/archive_status/ during a storage scare and sees a long list of files ending in .ready. They ask the question many of us have asked at least once: “Is replication broken?” Streaming replicas still look mostly fine, but .ready files keep piling up, disk usage keeps climbing, and nobody is fully sure what .ready and .done are actually telling you.

What is .ready and what (if any) action do I need to take? Let’s talk about that today.


Hint: It’s About WAL Delivery

Think of WAL delivery as three independent steps:

  1. Generate WAL
  2. Transport WAL
  3. Replay or consume WAL

archive_command is one way to do transport. Streaming replication is another. Note, logical replication also has a transport channel, but what it transports is decoded logical change data rather than raw WAL segment files.


What archive_command Actually Does

When archive_mode=on, Postgres tries to copy each completed WAL segment to long-term storage by running archive_command.

Typical example:

archive_mode = on
archive_command = 'rsync -a %p backup@walbox:/archives/%f'
  • %p is the local path to the WAL segment in pg_wal
  • %f is just the filename

Postgres runs this command from the archiver process. If the command exits with status 0, Postgres treats it as success. Any non-zero exit code means failure, and it retries later.

Info: Archiving usually happens when a WAL segment is complete (typically 16 MB), not every transaction. So pure archive shipping can have more lag unless segment switches happen frequently.


What .ready and .done Are For

Inside pg_wal/archive_status/, Postgres tracks each WAL segment’s archiving state with tiny marker files.

For a segment named:

000000010000000A000000FE

you may see:

  • 000000010000000A000000FE.ready
  • 000000010000000A000000FE.done

.ready

[...]

Why pg_hardstorage has no incremental chain
Posted by Hans-Juergen Schoenig in Cybertec on 2026-07-06 at 05:00

Almost every conversation about pg_hardstorage's repository format ends up at the same question: "where's the incremental chain?"

Short answer: there isn't one. By design.

The chain footgun

In a chained-incremental format, pgBackRest's default, Barman's incremental mode, every incremental references the previous backup directly:

full A   ←   incr B   ←   incr C   ←   incr D   ←   diff E

This is fine when everything works. But every chain has a single property that bites you at the worst time: any single corrupted backup invalidates everything downstream.

Real failure modes we've all seen:

  • An S3 lifecycle policy quietly deletes incr B; incr C..D and diff E become useless.
  • A bit flip on the storage backend corrupts diff E; the chain restores up to incr D only.
  • An operator runs backup expire with too-aggressive retention; full A goes; the entire chain is now floating.
  • The base full's manifest schema bumped between releases and the migration script had a rounding bug.

Each of these is recoverable in isolation. The pattern that bites is: you don't find out until the restore. The 3am restore.

Content addressing kills the chain

pg_hardstorage's manifest references chunks by SHA-256, not by reference to a previous manifest:

{
  "id": "prod-2026-05-02-0334",
  "chunks": ["7e1f2a…ab", "9c4d3b…12", "2faabc…77", /* … */]
}

Each chunk's filename is its hash. Two backups that share data also share chunks — but at the storage level, not via a "parent" pointer. Delete the older backup; the newer one's chunks stay until garbage collection finds zero references.

This is what restic, kopia, and (importantly) borgbackup all do. Not novel — but worth saying out loud, because in the PostgreSQL ecosystem the chained-incremental model is so dominant it feels like the only way. See the how it works page for a full walkthrough of the manifest format.

"But what about storage cost?"

The wins of chained incrementals are:

  1. Don't write the same byte twice when nothing
[...]

All Your GUCs in a Row: enable_partition_pruning
Posted by Christophe Pettus in pgExperts on 2026-07-06 at 01:00
PostgreSQL's partition pruning eliminates unnecessary partition scans in two distinct phases — at plan time and execution time — and you need to check…

VACUUM at the Page Level
Posted by Radim Marek on 2026-07-05 at 14:31

In HOT Updates in Postgres we covered page pruning clean up HOT chains, an elegant shortcut where PostgreSQL reclaims dead tuple space during ordinary reads. All that without waiting for any background process. But pruning is exactly that: a shortcut. It only works within a single page, and only for HOT-updated tuples. For everything else (cold updates that touch indexed columns, plain DELETEs, index entry cleanup, free space map registration, visibility map maintenance) we need VACUUM.

This article won't repeat what VACUUM does operationally. The DELETEs are difficult article covers autovacuum tuning, worker allocation, and the operational side of dead tuple cleanup. Here we are going to watch VACUUM work byte by byte. We'll snapshot a page before and after each phase, tracking exactly what changes in the page header, line pointers, tuple headers, free space map, and visibility map. Same tools as always: pageinspect, pg_visibility, and pg_freespacemap.

Setup

We need a table with enough rows to make the before-and-after comparison meaningful, plus indexes to demonstrate the full VACUUM cycle.

CREATE EXTENSION IF NOT EXISTS pageinspect;
CREATE EXTENSION IF NOT EXISTS pg_visibility;
CREATE EXTENSION IF NOT EXISTS pg_freespacemap;

CREATE TABLE vacuum_demo (
    id integer GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
    category text NOT NULL,
    payload text
);

INSERT INTO vacuum_demo (category, payload)
SELECT
    'cat_' || (i % 5),
    repeat('x', 100)
FROM generate_series(1, 50) AS i;

Fifty rows with a 100-byte payload each. The primary key gives us an index, which matters: VACUUM's behavior changes when indexes are involved. Run VACUUM once upfront so we start from a clean baseline:

VACUUM vacuum_demo;

Snapshot before any deletes

Record the baseline state of page 0. First the page header:

SELECT lower, upper, special, pagesize
FROM page_header(get_raw_page('vacuum_demo', 0));
 lower | upper | special | pagesize
-------+-------+---------+----------
   224 |  1392 |    8192 |     8192
[...]

All Your GUCs in a Row: enable_parallel_hash
Posted by Christophe Pettus in pgExperts on 2026-07-05 at 01:00
Parallel hash joins pool worker memory to build one shared table instead of having each worker build its own copy—a distinction that matters enormously on…

PostGIS 3.7.0alpha1
Posted by Regina Obe in PostGIS on 2026-07-05 at 00:00

The PostGIS Team is pleased to release PostGIS 3.7.0alpha1! Best Served with PostgreSQL 19 Beta1 and GEOS 3.15 which will be released soon.

This version requires PostgreSQL 14 - 19beta1, GEOS 3.10 or higher, and Proj 6.1+. To take advantage of all features, GEOS 3.15+ is needed. To take advantage of all SFCGAL features SFCGAL 2.3.0+ is needed.

3.7.0alpha1

This release is an alpha of a major release, it includes bug fixes since PostGIS 3.6.4 and new features.

PG DATA 2026 recap, and looking forward to PG DATA 2027
Posted by Henrietta Dombrovskaya on 2026-07-04 at 18:10

It has been a month since PG DATA 2026, the first full-scale event organized by Prairie Postgres. Looking at the feedback we received from the seekers, sponsors, and participants (and regrets of those who were unable to come :)), I couldn’t be happier with how it went.

I know everyone says this, but let me repeat: this event wouldn’t be possible without everyone who contributed in so many different ways! One more time, I want to thank all organizational committee members, all CfP members. volunteers, speakers, and every single person who attended. You all helped us to build an open and inclusive event where everyone felt welcome.

The organization team and volunteers were so efficient that I was able to attend several talks (which is a huge improvement in comparison with all three PG Days I organized in previous years :)). My only regret is that I didn’t have time for longer conversations with speakers and attendees, especially those who visited Chicago for the first time, but I hope it wasn’t their last time in our city!

And guess what – we are already working on PG DATA 2027! The website is not up yet, but mark your calendar for June 11-12, 2027, and plan to join us in Chicago!

Things I hope will stay the same

  • We will have a similarly amazing CfP committee, and will have a great program featuring both new and experienced speakers
  • We will keep the ticket prices low, making the conference affordable for anyone
  • We will have multiple community sponsors

Things I hope we will do more

  • More people are using DEI – focused grants
  • More training sessions
  • More students participation
  • We hope that at least some universities will participate in our Academic Partnership program

What will be better

  • The conference will be held on Friday and Saturday, which we hope will allow more people to participate
  • Better venue with more space and better floor plan (you won’t need to take the elevator to get from the Red Line to Green Line :))
  • More flexible sponsori
[...]

All Your GUCs in a Row: enable_parallel_append
Posted by Christophe Pettus in pgExperts on 2026-07-04 at 01:00
Parallel Append spreads workers across partitions or UNION branches simultaneously, not sequentially.

Looking Forward to Postgres 19: Checksums For All
Posted by Shaun Thomas in pgEdge on 2026-07-03 at 13:42

Data checksums are one of those Postgres features that, when they are doing their job, are easily forgotten. They sit quietly in the header of every data page as a small integer fingerprint, forever waiting to thwart the threat of cosmic rays or errant hardware failures. Most clusters run from cradle to grave and never trip a single one.For years, that decision was etched in stone at the time of database initialization. It wasn't until version 12 that Postgres introduced the pg_checksums utility to change it. And even then, doing so is a fully offline affair, grinding through every page on disk and incurring a long outage window.That's a fairly painful ordeal for a basic safeguard that wasn't even enabled by default until version 18. So why go through all the trouble in the first place? Do we really need data checksums in our Postgres cluster? The short answer is "yes". The longer answer explains why Postgres 19 continues to improve the checksum system by adding an online conversion capability.

Bit Rot Never Sleeps

Let's start with what a checksum actually defends against. Postgres is very good at protecting data from itself. Crash recovery, the write-ahead log, full page writes, all of that machinery exists to make sure a power failure mid-write doesn't leave a torn, half-updated page behind. But Postgres can’t help when the hardware itself lies about the data.Even with ECC RAM, that happens more often than you might expect. Cosmic rays can flip a bit in a memory cell. Failing drives may return stale sectors. Storage controllers could acknowledge writes that never made it to a platter. Any piece of the hardware, including the motherboard, CPU, and RAM, is suspect. In every one of these cases, Postgres asks for a page and the OS cheerfully returns something with no enduring validation. The data is just wrong, and nothing in the normal read path would ever know.A data checksum closes that gap. When checksums are enabled, every page written to disk carries a 16-bit checksum in the header computed from its co[...]

Top posters

Number of posts in the past two months

Top teams

Number of posts in the past two months

Feeds

Planet

  • Policy for being listed on Planet PostgreSQL.
  • Add your blog to Planet PostgreSQL.
  • List of all subscribed blogs.
  • Manage your registration.

Contact

Get in touch with the Planet PostgreSQL administrators at planet at postgresql.org.