Latest Blog Posts

PgQ and PgQue: Workflow Engines you might need in PostgreSQL
Posted by Jobin Augustine in Percona on 2026-09-28 at 14:43

In many real production databases, we often see some tables receiving high-frequency updates (millions per day) and autovacuum running repeatedly (hundreds of times per day). Additionally, those tables can sometimes become heavily bloated. The end effect is poor performance, poor concurrency, and an unmanageable database.

In case we are using methods pg_gather for diagnosis, such anomalies are easy to spot by clicking on the table header to sort.

Very often, a closer look at these tables reveals that status-update workloads are driving these heavy updates. Many times, even the table names reveal their purpose through words like “task”, “queue”, or “bucket”. A discussion with application architects often reveals that these tables are used for specific workflows, with status fields tracking what is completed and what remains pending for further processing. There can also be multiple workflow stages. Sounds like use case for Kafka, right? Yes, Kafka is widely used to manage such workflows.

While this is happening on the database side, the buzz around “Just use PostgreSQL” is becoming increasingly popular. System designers and architects want to reduce the complexity of maintaining multiple components and dealing with operational issues. More complexity implies more potential failures. Recently, Chandan Shukla wrote a blog post titled PostgreSQL as a Workflow Engine: Building Reliable Long-Running AI Jobs Without Kafka, detailing trade-offs and considerations for building a simple yet reliable workflow engine using simple methods.

Yet, critical questions remain:

  1. Is there a better way to architect database workflows in PostgreSQL?
  2. Can we build a highly scalable system without the performance degradation caused by frequent updates and table bloat?
  3. Is it possible to eliminate the complexity of external components like Kafka in favor of a purely PostgreSQL-centric workflow engine?

Yes, we can. Furthermore, when building modern enterprise applications where data arrives as even

[...]

Using the PGDG RPM repositories are now way easier!
Posted by Devrim GÜNDÜZ in EDB on 2026-09-28 at 13:42

yum.postgresql.org
and zypp.postgresql.org have a new look!

Users no longer have to navigate through pages on the website. Instead, the front page has a clear layout and easy-to-follow instructions. Just select your OS, version, architecture, and PostgreSQL version, and you'll see instructions that you can copy and paste. There is also a new "copy link" option that you can customize as needed, share in your blog posts, or parse in your automation systems. We now also provide easy installation instructions for the extra packages repository and the non-free repository.

Enjoy!

Why We Built pgEdge Starfleet
Posted by Phillip Merrick in pgEdge on 2026-09-28 at 13:12

Some of you may have seen our pgEdge Starfleet announcement, and be pondering the question of “why?”  Why did we build it, why now, and does the world really need another cloud Postgres service?It's a fair question, and the answer starts where most things at pgEdge start: with our customers.

It began with our customers

Much of what we do here at pgEdge is driven by our customers and the needs they bring to us. And what we saw was this: some of our customers in more regulated industries — financial services, healthcare, government — were watching what, literally, the cool kids were doing with all the new AI tooling on developer-friendly Postgres platforms. And they were coming to us saying, "We'd love to be able to do that ourselves."But of course, they're operating in highly restricted, compliant, highly secure environments. In the case of some of our government customers, those environments may even be air gapped.They wanted access to that same tooling and that same wonderful developer experience you get on the developer-focused Postgres platforms — but in a way that lets them stay compliant. They also wanted easy access to AI tooling like MCP servers and features like fast database branching. That was the genesis of the idea for pgEdge Starfleet.Our regulated customers also need to maintain data sovereignty, having complete control over their data, and ensuring it is only available in secure, compliant and pre-approved environments.

What is pgEdge Starfleet?

pgEdge Starfleet, in a nutshell, is a developer-friendly Postgres cloud platform that gives you the option to deploy anywhere: in our cloud, in your own cloud, on premises, even air gapped.You can prototype starting in our pgEdge fully managed cloud, and then choose where your application runs in production. You can deploy in our cloud. Or bring your own cloud — Amazon, Google, or Azure. Alternatively, you can deploy onto your own on-premises infrastructure, which can even be air-gapped. That choice is yours, and it doesn't cost you anything in ca[...]

Contributions for week 38
Posted by Cornelia Biacsics in postgres-contrib.org on 2026-09-28 at 07:11

On 22 September, the Toulouse PUG met, organized by

  • Geoffrey Coulaud
  • Xavier SIMON
  • Jean-Christophe Arnu
  • Stéphane Tachoires

Speakers:

  • Dimitri Vanoverbeke
  • Marc Rechté

On 23 September 2026, the Postgres Meetup Group Valencia met, organized by

  • Marcelo Diaz
  • Laura Minen
  • Martín Marqués

Speakers:

  • Heidi Uri
  • Javier Aragón Díaz

On 23 September 2026, the Hamburg PostgreSQL User Group met, organized by Joshua Steinmann and Tobias Alvermann.

Speakers:

  • Joshua Steinmann
  • Tobias Alvermann

On 23 September 2026, the PostgreSQL User Group Vienna met, organized by Cornelia Biacsics and Ranjeet Kumar.

Speakers:

  • Laurenz Albe
  • Sergey Chehuta

On 24 September 2026, the PostgreSQL Edinburgh Meetup-Group met, organized by Jimmy Angelakos. Daniel Roe delivered a talk.

On 14 September 2026, the Bay Area Postgres Meetup Group met. Organized by Elizabeth Christensen. Elizabeth Christensen and Lukas Fittl delivered a talk.

All Your GUCs in a Row: max_sync_workers_per_subscription
Posted by Christophe Pettus in pgExperts on 2026-09-28 at 06:07
max_sync_workers_per_subscription parallelizes table copies across tables, not within them.

RHEL / Rocky Linux / AlmaLinux repository RPMs now follow the OS minor version
Posted by Devrim GÜNDÜZ in EDB on 2026-09-28 at 00:57

Since I started building packages separately on each supported RHEL minor version, there has been a repository RPM for each minor version (9.6, 9.7, 9.8, 10.0, ...) in addition to the one for the major versio  (9, 10). All of them share the same package name, and the minor version specific ones are also published in the repository of the latest minor version. As a result, dnf update replaced the major version repository RPM with the one of the latest minor version at that time, which then stayed on that minor version forever, even after the OS moved to a newer one.

I just fixed that issue. Please update the repo RPMs at your earliest convenience. Read the details here:

https://yum.postgresql.org/news/repo-rpms-follow-os-minor-version/

Issue detail: https://github.com/pgdg-packaging/pgdg-rpms/issues/215

I'd like to thank Daryl Herzmann for the report, analysis and testing.


What REPACK (CONCURRENTLY) costs while it runs
Posted by Radim Marek on 2026-09-27 at 23:30

Two years ago I compared pg_repack and pg_squeeze, the two extensions most of us reach for when a table has bloated beyond what autovacuum will ever give back and VACUUM FULL isn't an option.

PostgreSQL 19 changes the starting point. REPACK brings VACUUM FULL and CLUSTER together under one command, and REPACK (CONCURRENTLY) does the rewrite online. It needs no extension and no shared_preload_libraries, so it works on managed services too. That will bring online repacking to a much wider audience, so I spent the last few weeks measuring what it actually does to a running database, and how it compares with the two extensions.

All data in this post comes from PostgreSQL 19beta4 (release build). The big-table tests ran on a Hetzner ccx33 (8 dedicated vCPUs, 32 GB RAM, local NVMe) and on a GCE n2-standard-4 (4 vCPUs, 16 GB RAM, pd-ssd), with pg_repack and pg_squeeze built against the same 19beta4. It's a single test table, so how the tools compare matters more than the exact times.

How it works

Rewriting a table is easy when nobody is using it. VACUUM FULL takes an ACCESS EXCLUSIVE lock, copies the live rows into a new file, rebuilds the indexes and swaps the files. Nobody can read or write the table in the meantime, and on a big table that's minutes or hours.

The online version REPACK (CONCURRENTLY) does the same. Except you can use the table while it's being copied and hence it keeps changing while the process runs. A row copied in the first few seconds can get updated two minutes later. Or deleted. An online repack tool needs to do three things.

  • Consistent starting point
  • Record of everything that changed during the process
  • And a way how to apply those changes

REPACK gets the first two steps for free from logical decoding. The mechanism logical replication is using. It starts by creating a temporary replication slot, which gives it a snapshot. Point in time for the initial copy. Because every change that happens during that phase is written to WAL anyway, a background work

[...]

PostgreSQL indexes for multi-tenant SaaS: tenant_id first
Posted by Chris van Eijk on 2026-09-27 at 22:30
Five indexes, 1,000 tenants, one query, measured in PostgreSQL 17: why tenant_id goes first, what RLS does to the plan, and when partitioning pays off.

Invoice numbers per tenant in PostgreSQL, without gaps
Posted by Chris van Eijk on 2026-09-27 at 22:30
Sequence, max()+1, SERIALIZABLE or a counter row: five ways to number invoices per tenant, measured under load in PostgreSQL 17 for duplicates, gaps and speed.

What “AI-Ready” Actually Means
Posted by Vibhor Kumar on 2026-09-27 at 18:49

The phrase now appears on almost every technology vendor’s website. That’s exactly why it has stopped meaning much.

A database is called AI-ready because it supports vectors. A cloud platform is AI-ready because it offers foundation models. A data platform is AI-ready because it can build a RAG pipeline. An application platform is AI-ready because somebody added a copilot.

These capabilities matter, but none of them answers the harder enterprise question: can the organisation safely turn its existing data, systems, processes and business rules into trusted AI-assisted or autonomous outcomes?

That’s a much higher bar. Think of an organisation with fragmented data, decades of applications, several clouds, conflicting sources of truth, regulatory obligations and a board asking when agents will reach production. For that organisation, “AI-ready” can’t mean starting again with a pristine architecture. It has to mean something more practical:

An organisation is AI-ready when it can introduce increasingly capable AI without losing control of data, authority, outcomes or evidence.

That changes the conversation. The question is no longer simply “Can we run AI?” It becomes a set of harder questions. Where should AI run? What should it know, and what should it be allowed to do? How will we know what happened when something goes wrong? And can the architecture evolve as models, regulations, workloads and business requirements change?

Those are architecture questions.

AI-ready doesn’t mean AI-first

One of the easiest mistakes in enterprise AI is to start with the model. Which LLM? Do we need an agent? Which vector database? Should we build a knowledge graph? Which orchestration framework becomes the standard?

These are useful questions, but they are rarely the first ones. A better sequence starts with the outcome. What business result are we trying to improve, and what data and context does it require? Which parts of the process should stay deterministic, and where does judg

[...]

All Your GUCs in a Row: max_standby_archive_delay and max_standby_streaming_delay
Posted by Christophe Pettus in pgExperts on 2026-09-27 at 01:00
`max_standby_streaming_delay` buys you replication lag, not query time—and when the budget runs out, queries get canceled regardless of how long they've…

All Your GUCs in a Row: max_slot_wal_keep_size
Posted by Christophe Pettus in pgExperts on 2026-09-26 at 01:00
Replication slots can silently fill your disk and crash the primary, or you can set `max_slot_wal_keep_size` to kill a stalled replica instead.

Our Interleaved Backfill Wrote Three Times the WAL
Posted by Mikhail Shytsko on 2026-09-26 at 00:00

TypeSafe opened early access to its Jev model on 15 September 2026, pricing input at $0.042 per million tokens and listing output tokens as free, so at our own estimate of 150 input tokens a support ticket, labelling ten million tickets comes to about $63. Storing those labels in new category and confidence columns is a Postgres backfill on a large table, and when we ran one on a million rows in ten batches, the WHERE clause that picked each batch decided most of what the table paid for it.

Range batches at the default fillfactor, with nothing run between them, took the heap from 269.3 MB to 548.3 MB and nearly doubled the three indexes to 70.1 MB. Only 11.5% of the updates were HOT when we repeated them at fillfactor 90 with a VACUUM after every batch, so the indexes still grew to 64.4 MB. Swapping id between lo and hi for id % 10 = r, and changing nothing else, lifted the HOT share to 96.1% and held the indexes at 36.4 MB against the 35.6 MB they started at. Where range batches wrote 850 MB of WAL, interleaving wrote 455 MB, a lead it kept only until a checkpoint followed every batch and the interleaved run wrote 3 022 MB against 1 025 MB for range batches.

Heap plus index size before and after each of ten batches in a postgres backfill on a large table, where range batches without VACUUM climb from 305 MB to 618 MB, range batches with VACUUM end at 403 MB, and id % 10 batches with VACUUM stay near 336 MB before finishing at 349 MB

Key Takeaways

  • Ten range batches without VACUUM ended with the same heap as one UPDATE over all million rows, so batching alone did nothing for the heap.
  • A VACUUM after each range batch kept the heap of a fillfactor 100 table to 306.0 MB, but the indexes still reached 65.0 MB and the WAL came out slightly higher than without it.
  • Range batches stay mostly non-HOT even at fillfactor 90 because each asks every page it touches for new versions of all its rows at once, where an id % 10 batch asks for one row in ten.
  • A hybrid that runs all ten id % 10 passes inside one id range before moving to the next kept interleaving's HOT share and wrote 544 MB of WAL with a checkpoint after every range.
  • ALTER TABLE ... SET (fillfactor = 90) with no rewrite still gave 86.2% HOT on a table loaded at fillfactor 100, and a rewrite by V
[...]

Your Postgres Database Is Slow, and It Isn’t Postgres
Posted by Umair Shahid in Stormatics on 2026-09-25 at 14:02

What a 4 TiB Azure Disk Taught Us about Slow Reads

One of our customers spent most of a week tuning PostgreSQL to fix slow reads. They worked through shared_buffers, effective_cache_size, work_mem, and the rest of the checklist, and set all of them sensibly. The reads stayed slow. And the reason had nothing to do with any of those settings. Their data disk had reached 4 TiB, and the moment it did, Azure switched off the host cache sitting in front of it.

That is the frustrating thing about storage. Postgres sits on top of it and trusts it completely. When the disk underneath is capped, throttled, or uncached, Postgres has no way to tell you. It just waits. And from the inside, waiting on a slow disk looks a lot like a database that needs tuning, so that is exactly where people spend their time. But the real problem is a PostgreSQL storage bottleneck, the one place few people think to look.

Here are the four traps we see most often, beginning with the one behind this customer’s slow reads:

Trap One: The Caching Cliff at 4 TiB

On Azure, host caching is a significant performance feature. The VM keeps a cache built from its own memory and a local SSD, and serves a large share of your reads from that cache, so they never travel to the remote data disk. With that cache working, a VM can read faster than the underlying disk could ever deliver on its own. For a read-heavy Postgres workload, that cache is doing a lot of quiet, unglamorous work.

Then the disk reaches 4 TiB, and the cache turns off.

That is the part that catches everyone. Azure supports host caching only on disks smaller than 4 TiB. The moment a single managed disk is 4 TiB or larger, caching disappears, and every read takes the long trip to remote storage. Nothing in Postgres changed. Nothing in your config changed. You simply grew the disk to a size you probably didn’t know mattered, and your read path got slower.

[...]

How to Inspect a pg_dump Without Restoring It
Posted by Dmitry Narizhnykh on 2026-09-25 at 12:56
How to Inspect a pg_dump Without Restoring It

You can't read a pg_dump file the way you read a table. To see what is inside, you normally restore it into a PostgreSQL server first.

pg_restore and grep can list the tables without a restore, and even print a table's rows as raw text. They can't filter, sort or join them.

The free PostgreSQL Dump Viewer opens a pg_dump without a server. It replays the dump into a real PostgreSQL inside your browser tab and shows the tables, rows and foreign keys. You can run read-only SQL on it, and the file is never uploaded.

How to Inspect a pg_dump Without Restoring It
The Pagila sample dump opened in the browser: every table with its row count on the left, the rows of the one you pick on the right.

Before restoring a dump, you often need one small answer: is this the right backup, which schemas does it contain, are the rows you need actually there? Starting a server, restoring, waiting and then running one query is sensible for a real recovery. It is too much ceremony for a received backup or a pre-restore check.

The job is inspection, not recovery

Restoring a database puts it back into service; inspecting a dump answers a question about a file.

For inspection, the first things I want are usually the database tree, a table preview, the declared foreign keys, and read-only SQL. If I find what I need, I might export that result as CSV or JSON. If I do not, I have learned that before setting up a server and committing to a restore.

Replay the dump in the browser instead of on a server

That is why we built the PostgreSQL Dump Viewer. It replays the dump into a real PostgreSQL running inside the browser tab. The file never leaves your computer, and the temporary database is gone when you close the tab.

The result is deliberately narrow: browse schemas and tables, inspect relationships, run read-only PostgreSQL SQL, and export a result. It is not a production restore service.

PostgreSQL Dump Viewer Restore into a PostgreSQL se
[...]

Let’s Get Down to Business with Rails and PostgreSQL
Posted by Andrew Atkinson on 2026-09-25 at 10:40

I’m happy to share that I was a guest on the Rails Business podcast and the episode is now live. Here’s a recap of the topics we discussed.

Engineering Work at Aura

We spent most of the time discussing engineering work last year related to scaling the database workload for peak traffic at Aura where we use Ruby on Rails and PostgreSQL.

I’m presenting this information in two places this fall, Rails at Scale Summit in Austin, TX, and the Postgres Summit in NYC.

Besides the podcast, you can get more details in these posts:

If you’re not able to make those events or prefer to listen to a discussion of the content, then the podcast will have a lot of the same information.

Technical Books

Besides the work at Aura, we also checked in on my book High Performance PostgreSQL for Rails, which has now been available in print for two years. Ryan asked about what’s next for the book, and it’s a difficult question to answer.

With the availability and quality of AI tooling for software engineers, I don’t see developers buying books as much. With fewer prospective readers, the ROI is less attractive for authors and publishers to commit to the resource-intensive process of creating a book.

I’m grateful to have had the opportunity to write a book before the rise of the AI tools. I’m still getting positive feedback from my book which is very fulfilling.

Recently I met Madison Sites who’s a reader, and they shared feedback that they’re reading the book as part of the WNB.rb book club. Madison said the book has been helpful for building vocabulary and familiarity with database concepts and implementation details, and that’s helped with database work and better comprehension for conference talks about similar topics. I appreciated hearing about that!

Using AI Tools

We segued into how we

[...]

All Your GUCs in a Row: max_replication_slots
Posted by Christophe Pettus in pgExperts on 2026-09-25 at 01:00
`max_replication_slots` sizes a shared-memory array that holds every replication slot, regardless of type or state.

What Development Looked Like at PGConf.dev 2026
Posted by Cornelia Biacsics on 2026-09-24 at 23:34

With PGConf.dev 2027 now on the horizon, I found myself thinking back to PGConf.dev 2026 and all the moments that stayed with me.

From 19–22 May 2026, I attended PGConf.dev for the very first time in Vancouver, Canada.

What started with two accepted talk submissions for the Community Day at PGConf.dev 2026 turned into four days filled with community discussions, anniversary celebrations, hallway conversations, poster sessions, unconference discussions, and countless opportunities to meet the people behind PostgreSQL.

Some moments made me think. Some made me laugh. Others reminded me why I enjoy contributing to this community so much.

Between my first PGConf.dev, my recent transition to Microsoft, two accepted talks, a community coin I didn’t expect, and a brief moment of wondering whether I belonged, this conference turned out to be far more memorable than I anticipated.

Some moments stayed with me...

PGConf.dev 2026 took place in Vancouver, Canada. I decided to arrive a few days early, for several reasons:

  • My travel time from Austria was roughly 13 hours, and I wanted some buffer in case a connecting flight decided to make things interesting.
  • I had no idea how quickly I would adapt to a nine-hour time difference.
  • I had never been to Canada before. The additional days gave me the chance to do some sightseeing before the conference started. That included Waterfalls, mountains & whale watching.

About PGConf.dev

I have attended many PostgreSQL conferences in Europe over the years, and one thing I always enjoy is seeing how every event develops its own personality.

PGConf.dev immediately felt different.

PGConf.dev (2024–2026), formerly known as PGCon (2007–2023), it is a conference for people who actively build PostgreSQL. And when I say build PostgreSQL, I do not only mean writing code.

PGConf.dev brings together: PostgreSQL committers and code contributors, Documentation writers, Infrastructure maintainers, Meetup organizers, Community o

[...]

All Your GUCs in a Row: max_prepared_transactions
Posted by Christophe Pettus in pgExperts on 2026-09-24 at 01:00
Prepared transactions are orphaned sessions that hold locks and block vacuum indefinitely.

Hacking Workshop for October 2026
Posted by Robert Haas in Databricks on 2026-09-23 at 19:16

October's hacking workshop will cover my talk, pg_plan_advice: Plan Stability and User Planner Control for PostgreSQL?. If you're interesting in joining us, please sign up using this form and I will send you an invite to one of the sessions.

Read more »

pgBackRest and PostgreSQL failover: why archive_mode matters
Posted by Stefan Fercot in Percona on 2026-09-23 at 13:35

A recent question on the community channels described a difficult situation: a standby had been promoted with archive_mode=off, and restarting the new primary was something the team wanted to avoid. Could they enable archiving on a downstream standby and take a pgBackRest backup from there instead?

Their attempt failed with archive_mode must be enabled, even with archive-mode-check=n. Removing the checks from pgBackRest’s source code allowed their proof of concept to succeed, but was that enough to trust the approach?

My recommendation was to return to a supported configuration, either through a restart or a controlled switchover. But I wanted to take a closer look and see whether archive-mode-check=n might allow the standby-based approach.

So, in this post, we’ll try to reproduce the situation, examine what pgBackRest checks, and see why a successful backup and restore don’t tell the whole recovery story.


pgBackRest and PostgreSQL failover: why archive_mode matters

The test environment consists of three VMs running AlmaLinux 10 and PostgreSQL 18: pg1, pg2, pg3. We’ll set up cascading replication: pg1 → pg2 → pg3.

Set up the primary (pg1)

Let’s first set up pgBackRest on the primary (pg1):

  • In /etc/pgbackrest.conf:
[global]
repo1-path=/shared
repo1-retention-full=4
log-level-console=info
log-level-file=detail
compress-type=zst
start-fast=y

[demo]
pg1-path=/var/lib/pgsql/18/data

The configuration here is relatively simple: we will store WAL archives and backups on a /shared drive accessible from all hosts involved.

  • In postgresql.conf:
archive_mode = on
archive_command = 'pgbackrest --stanza=demo archive-push %p'

Remember, changing archive_mode requires a PostgreSQL restart, while changing archive_command only requires a reload.

  • Then, let’s initialise the repository and make sure WAL archiving is working:
$ pgbackrest --stanza=demo stanza-create
$ pgbackrest --stanza=demo check
  • Time to take the first backup:
$ pgbackrest --stanza
[...]

Part 2/6 | Breaking the Postgres Superuser Guardrails: Attacking Security-Hardening Extensions |Systemic Risks in the Managed PostgreSQL Industry
Posted by Mehmet Ince on 2026-09-23 at 01:05

It’s been a month since I published the first part of this research, and interest from the Postgres community has been higher than I expected. Most vendors I contacted were shy to respond, so the Databricks team’s blog post Collaboration makes us all stronger was one of the first examples of a vendor publicly sharing their side of the story.

In the past four weeks, I spoke with managers of managed Postgres services, security engineers, and red teamers who look for new threats in the services they offer. Here’s what I learned from those conversations:

  • None of them had monitoring in place for the shared-buffer-based superuser backdoor technique I described in my first article.
  • Risks from extensions are just as serious as having a zero-day in PostgreSQL core, but no one seems to be focusing on them.
  • Security hardening extensions are meant to stop hackers from attacking the underlying infrastructure and to keep users from misconfiguring their setup.

My initial plan was actually write about PostgreSQL core vulnerabilities but the coordinated work with the vendors takes longer than I expected. As the time flies and given that I only have a 40-minute talk at PGCONF.EU, there’s simply no way I’ll be able to cover everything I gathered in a single session. So I want to share all the things I wont be able to cover at the talk here as a blog post.

In this article you will see the vulnerabilities I have found on PostgreSQL vendors’ security hardening extensions and the broader threat model discussion.

What is the security-hardening extension ?

A few months ago, when I first logged in to a managed Postgres provider’s instance, I noticed I didn’t have superuser rights. Still, I could update all the data and set up features that usually require superuser rights. But I wasnt the superuser. This made me wonder how and why they set it up this way.

The answer is pretty simple. When a new PostgreSQL backend starts, custom security extensions step in and check queries to decide if the user

[...]

All Your GUCs in a Row: max_pred_locks_per_transaction
Posted by Christophe Pettus in pgExperts on 2026-09-23 at 01:00
max_pred_locks_per_transaction has the naming problem of max_locks_per_transaction, and then one of its own. Like its namesake, it is a table size quoted per backend slot, not a limit on any transaction. Unlike its namesake, most of what its table holds at any given moment belongs to transactions…

The Shadow Knows
Posted by Christophe Pettus in pgExperts on 2026-09-22 at 16:00
ClickHouse released WalShadow last week, and it does something very… brave: it replicates PostgreSQL into ClickHouse without using logical decoding at all. It reads the physical WAL stream, the same bytes a streaming replica gets, decodes heap records itself, and writes ClickHouse-native blocks. …

Ten years of Postgres logical replication
Posted by Dimitri Fontaine on 2026-09-22 at 15:26

A long time ago I ran a write-heavy system on a hub and a handful of workers. Each worker took a share of the application traffic and wrote events locally. The hub owned the reference data (customers, plans, prices), pushed it down to the workers, and pulled every worker’s events back up to compute the invoices. The plumbing was Londiste and PgQ: triggers on every table, a queue per node, a ticker, and a Python daemon per hop. It worked, and it was a lot of moving parts to explain to anyone new.

Postgres 10 shipped logical replication in 2017, and 19 is the tenth release that has it. Every release since Postgres 10 has taken a piece of that plumbing and made it a line of SQL.

This is the first article in a series about Postgres logical replication use-cases, and about how the feature set has evolved over the past ten years and ten releases. The question is the application developer’s one, not the DBA’s: which architectures can I deploy with Postgres core alone today, what does each release change about that, and where do I still need something else? I built three architectures for real, across three posts:

  1. Hub and workers, spreading the write load across servers — this post.
  2. Consolidation: many databases, different applications and schemas, into one, then re-exported as a change stream for a CDC consumer.
  3. Zero-downtime major upgrade, with a way back.

A fourth post, covering what is left out of this series in less detail — geo-replication, BDR-style multi-active setups, plain CDC and triggers — is also planned.

Being considerate of other people's time
Posted by Tomas Vondra on 2026-09-22 at 10:00

If I could give one piece of advice to the past me, starting to contribute to open source projects, it’d be to value other developers' time more. It took me a while to appreciate the “economy” behind this, and adjust how I work to increase my chance of getting patches done. Hopefully some new contributors could learn from my mistakes.

All Your GUCs in a Row: max_pred_locks_per_page and max_pred_locks_per_relation
Posted by Christophe Pettus in pgExperts on 2026-09-22 at 01:00
PostgreSQL's serializable isolation remembers what each transaction reads with limited shared memory, so it trades tuple locks for page locks, then page locks…

Forty Deletes Vanished From pg_stat_statements
Posted by Mikhail Shytsko on 2026-09-22 at 00:00

On the server this article was written against, pg_stat_statements_info.dealloc reads 20, and that counter is all the database has left to say about forty rows an agent deleted. The forty entries were there while the DELETE statements ran, one per table, counted and timed like anything else. Then the same agent read the schema twice over, 12 800 statements that changed not one row, and the reading needed room.

The eviction is documented behaviour rather than a defect. The view is sized once, at 5 000 entries by default, and once more distinct statements arrive than that the documentation says "information about the least-executed statements is discarded". Run once, a statement is the least-executed thing in the database.

Forty one-off DELETE statements recorded in pg_stat_statements, then 12 800 read statements from the same session, and afterwards zero of the forty remain while dealloc reads 20

Ordinary application traffic sits at the far end of the axis that policy implies, since an application issues a small set of statements a great many times each. An agent writing its SQL fresh on every turn does the reverse, and the rewriting adds a second cost on top, because a question asked in two shapes occupies two entries and each of those two has been called once.

Key Takeaways

  • Twelve ways of asking one question produced eight entries. Lowercase keywords, reflowed whitespace, a leading -- comment and a public. prefix all merged into the baseline, while count(1), a table alias, a swapped predicate order, a subquery and a CTE each took an entry of their own.
  • Two tenant schemas whose same-named tables hold 100 and 100 000 rows share one queryid on PostgreSQL 18, where 17 kept them apart, and the surviving entry carries the name of whichever schema was queried first.
  • Nothing in the view names the caller beyond its role. Two connections under one role, one with application_name set to payments-api and one to claude-agent, landed in the same entry, so an agent borrowing the application's login cannot be separated from it after the fact.
  • With track at its default top, a statement inside a PL/pgSQL function or a DO block leaves no entry of its own, and the sam
[...]

Multi-tenant SaaS on PostgreSQL: six decisions
Posted by Chris van Eijk on 2026-09-21 at 22:00
The six choices a multi-tenant SaaS locks into PostgreSQL: isolation model, RLS, indexes, money, restoring one tenant and migrating at scale. All measured.

The Promise of Non-Volatile Memory
Posted by Bruce Momjian in EDB on 2026-09-21 at 19:00

Relational databases like Postgres provide many unique features, specifically atomicity, consistency, isolation, and durability (ACID), but providing durability has always been a challenge. Though computers originally used non-volatile magnetic-core memory, the past five decades have been dominated by computer architectures where CPU-accessible memory is volatile, and OS-accessible storage is non-volatile/durable. Postgres uses the write-ahead log (WAL), which is stored on OS-accessible durable storage, to provide durability. (I recently wrote a presentation about WAL, and I have a presentation explaining durability.)

However, using OS-accessible storage for durability adds complexity. What if CPU-accessible memory, where most of the database processing happens, could be made durable in a high-performance and cost-effective way? This has been a goal of memory manufacturers for over twenty years, and it might finally be ending in failure.

Variously called phase change memory (PCM), 3D XPoint, Optane, and non-volatile Compute Express Link (CXL), the technology allows durable CPU-accessible memory to be mixed with volatile DRAM in the same system. This 30-minute video covers the fits and starts of the effort, and its eventual abandonment by Micron and Intel. This 2012 article summarizes frustration with the industry, "Long-derided as a Techno-Ponzi scheme — useful for raising a development budget but never delivering a return — PCM may now finally start earning its way in the world."

Continue Reading »

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.