#​607 — July 10, 2025

Web Version

Together with  Atlas

Postgres Weekly

When SIGTERM Does Nothing: A Postgres Mystery — A team at ClickHouse encountered a bug with read replicas that caused replication setup commands to hang indefinitely and ignore cancellation requests, risking stalled pipelines and growing disk usage. There’s a happy ending, though, with the cause identified and a patch rolled out to maintained versions of Postgres, so now we can all safely interrupt replication on standbys again.

Kevin Biju Kizhake Kanichery (ClickHouse)

Tame Complex PostgreSQL Schemas with Atlas — Inspired by Terraform, Atlas provides a declarative approach to schema migrations, enabling teams to define their schemas as code and automate planning, validation, and deployment.

atlasgo.io sponsor

Migrating the Jira Database Platform to AWS Aurora — Atlassian’s Jira uses Postgres and each user gets their own database. Millions of users equals millions of databases, and migrating four million databases spread across 3,000 Postgres servers to AWS Aurora was no mean feat.

Pat Rubis (Atlassian)

IN BRIEF:

So Why Don't We Pick the Optimal Query Plan? — Explores how a potentially outdated default (random_page_cost) can often result in suboptimal index scan choices, and what we can do to mitigate it.

Tomas Vondra

Mastering Replication Slots: Preventing WAL Bloat and Other Production Issues — Gunnar warns that a replication slot may sometimes cause large amounts of write-ahead log (WAL) segments to be retained by the database. He shares best practices to help prevent this and touches on some good practices around heartbeats, replication slot failover, monitoring, and more.

Gunnar Morling

pgsqlite: A Postgres Protocol Adapter for SQLite Databases — A way for Postgres clients to connect to and query SQLite databases as if they were Postgres ones. Considered ‘experimental’ for now.

Eran Sandler

📄 Coming to Postgres: On-Disk Database Encryption Lindsay Clark (The Register)

📄 Handling Unique Indexes on Large Data Volodymyr Potiichuk

📺 Syncing Postgres into the Client James Arthur

🏆 The Top Links of 2025 (So Far)

As it's both a particularly quiet week in the Postgres world and we're roughly half way through the year, we thought we'd do a quick roundup of the most popular Postgres Weekly items of the year so far, in case you missed them at the time:

1. Life Altering Postgres Patterns — The author promised the title wasn't just clickbait and delivered twelve different bite-size, hard-learned tips and insights in areas from using UUIDs as primary keys and table naming to the use of schemas and views.

Ethan McCue

2. Microsoft's New 'IDE' for Postgres in VS Code — Released just two months ago now, Microsoft unveiled a public preview of a Postgres extension for its VS Code editor to let you manage database objects, use IntelliSense to build queries, and integrate with Copilot too. ▶️ Matt McFarland gave a good POSETTE 2025 talk showing it off.

Microsoft

3. Don't Do This (in Postgres) — We link to this intriguing page on the official Postgres wiki every year or two, and it's always popular! The page rounds up a variety of advice around ‘common mistakes’ in using Postgres and what not to do. It'd be great to see more things added over time.

Postgres Wiki

4. Postgres 18 Beta Released: 7 Features to Know About — We're still waiting for the final Postgres 18 release, due in the next few months, but the first beta was released in early May and Heikki shared a few things he's looking forward to.

Heikki Linnakangas (Neon

5. How to Fix a Common Cause of Slow Queries in Postgres — Technically a 2024 item, but we first linked to it in January! A database engineer at the Render cloud platform shows off a commonly encountered, but trivially fixed, performance issue caused by missing indexes on foreign keys.

Eric Fritz

6. 1 Trillion Rows in Citus?“Postgres scales,” but just how far does that go? Hans-Jürgen decided to find out, running a little (or is it big?) experiment to see if a 1 trillion row table is even achievable.

Hans-Jürgen Schönig

7. A Roundup of Postgres Query Plan Visualization Tools — The EXPLAIN command, along with its many options, gives you a deep view into how Postgres plans to execute a query and is a great way to figure out why certain queries are slow. The raw output can be tricky to read, though, but there are several tools that can help break things down.

Michael Christofides

8. How OpenAI Scales Postgres to the Next Level — A writeup of a talk given by OpenAI engineer Bohan Zhang at PGConf.dev about how OpenAI manages to scale with an unsharded approach using just one writer and multiple readers despite Postgres being ‘the backbone of [its] most critical systems’. If it’s good enough for them…

PixelsTech / Lao Feng