---
title: "Sharding a Postgres database without downtime"
publication: "Postgres Weekly"
issue: 616
published_at: "2025-09-18"
canonical_url: "https://postgresweekly.com/issues/616"
---

Plus the evolution of logical replication, superuser-free maintenance, and we're just one week away from Postgres 18. |        

#​616 — September 18, 2025 

[Web Version](https://postgresweekly.com/issues/616)   

🖋️ Due to the final release of Postgres 18 being expected next Thursday (September 25), we may send next week's issue a little later than usual.
__
_Peter Cooper, your editor_ 

Together with [![pgAnalyze\](https://res.cloudinary.com/cpress/image/upload/c_fill,g_auto,e_trim,w_350,h_100/e_make_transparent/co_white,e_outline:7/lhwcvgc1asd4fzaahty4.png)](https://events.zoom.us/ev/AobVQd89GZ9_3qw_XbUppUb9Xm4Zp0HzFugyyCzNEjgwrylG8mUQ~Arr3pRJm39ddhsqIYZ2rhHZ9vSpPnPYy7zeKqLzUW5iJ6JAjrQOCl74inME_ZMUfs9o3fpAab_SND8y9xk6zNdNSRA)   

Postgres Weekly 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60/s9qtubbavnoqyklkrzoh.jpg)](https://www.cybertec-postgresql.com/en/database-is-not-accepting-commands/)  

[_"database is not accepting commands"_: What Now?](https://www.cybertec-postgresql.com/en/database-is-not-accepting-commands/) — This is an error you'd certainly rather not encounter as it means you have some serious work to do to avoid a transaction ID wraparound. If you _do_ encounter it, though, Laurenz reminds us of what to do and some "inferior measures" to avoid. 

Laurenz Albe   [![\](https://res.cloudinary.com/cpress/image/upload/c_limit,w_480,h_480,q_auto/copm/e73456ab.png)](https://events.zoom.us/ev/AobVQd89GZ9_3qw_XbUppUb9Xm4Zp0HzFugyyCzNEjgwrylG8mUQ~Arr3pRJm39ddhsqIYZ2rhHZ9vSpPnPYy7zeKqLzUW5iJ6JAjrQOCl74inME_ZMUfs9o3fpAab_SND8y9xk6zNdNSRA) 

[Hands on Postgres 18: Async I/O, B-tree Skip Scan & More](https://events.zoom.us/ev/AobVQd89GZ9_3qw_XbUppUb9Xm4Zp0HzFugyyCzNEjgwrylG8mUQ~Arr3pRJm39ddhsqIYZ2rhHZ9vSpPnPYy7zeKqLzUW5iJ6JAjrQOCl74inME_ZMUfs9o3fpAab_SND8y9xk6zNdNSRA) — With Postgres 18 set to release this month, now is the time to understand its performance-focused updates: from asynchronous I/O and planner changes, to B-tree Skip Scans, UUIDv7, VACUUM changes, and enhanced monitoring for production workloads. 

pganalyze sponsor   

[Sharding Our Core Postgres Database (Without Any Downtime)](https://gadget.dev/blog/sharding-our-core-postgres-database-without-any-downtime) — Gadget, an online JavaScript dev platform, kept everything in a single, large Postgres instance but eventually reached the limits of vertical scaling. Here’s how they sharded their database without any downtime or dropped requests. _“You can’t spell shard without hard”!_ 

Harry Brundage (Gadget)   

**IN BRIEF:** 

- 🇺🇸 [PGConf NYC](https://2025.pgconf.nyc/) is taking place later this month in New York City and there are still tickets available.
- Can you store the date of the world's oldest known financial transaction in Postgres? [Turns out you can.](https://avi.im/blag/2025/oldest-txn/)
- If you're using Debian 12 and are running Postgres under a `US/*` timezone, [here's a quirk to be aware of](https://rachelbythebay.com/w/2025/09/11/debtz/) before making the upgrade to Debian 13.   

[The Evolution of Logical Replication in Postgres: A Historical Overview](https://www.enterprisedb.com/blog/evolution-logical-replication-postgresql-firsthand-account) — A quick rundown of approaches taken over the past 20 years. Petr has been involved with numerous logical replication related projects over the years (and gave [a talk about Postgres replication](https://www.youtube.com/watch?v=oo_gZkMdcio) at PostgresOpen 2016) so this is a reliable perspective. 

Petr Jelinek   

[Postgres Maintenance _Without_ Superuser](https://boringsql.com/posts/postgresql-predefined-roles/) — A look at the built-in, predefined administrative roles that let you perform numerous maintenance tasks without requiring superuser access. 

Radim Marek   

[Getting Excited About Postgres 18](https://www.crunchydata.com/blog/get-excited-about-postgres-18) — We’re still a week away from the final Postgres 18 release, but there’s plenty to get excited about, not least the introduction of asynchronous I/O which will [open up a performance boost](https://pganalyze.com/blog/postgres-18-async-io) for many of us. 

Elizabeth Christensen (Crunchy Data)   

📊 [The Cost of TDE and Checksums in Cybertec PostgreSQL Enterprise Edition (PGEE)](https://www.cybertec-postgresql.com/en/the-cost-of-tde-and-checksums-in-pgee/) – I’m pleasantly surprised what little performance effect transparent data encryption has. Christoph Berg 

📄 [How to Implement the Outbox Pattern in Go and Postgres](https://packagemain.tech/p/how-to-implement-the-outbox-pattern-in-golang) – A resilient way to ensure messages end up where they’re meant to go. Alex Pliutau 

📄 [Making Postgres Scale to Zero with CloudNativePG](https://xata.io/blog/making-postgres-scale-to-zero-with-cnpg) Esther Minano Sanz (Xata) 

📺 [Compiling Postgres to WebAssembly with PGlite](https://www.youtube.com/watch?v=cPMi1GbICmE) – A 30-minute talk. Sam Willis       

📰 Classifieds   

🏁 [Scale sub-ms speed](https://redis.io/lp/get-started2/?utm_source=cooper-press&utm_medium=cpa&utm_campaign=2025-08-app_performance-postgres-weekly-2&utm_content=cloud_-_redis_cloud_users). Redis 8.2 pushes 1M+ ops/sec. [Deploy for free](https://redis.io/lp/get-started2/?utm_source=cooper-press&utm_medium=cpa&utm_campaign=2025-08-app_performance-postgres-weekly-2&utm_content=cloud_-_redis_cloud_users) and stress-test it in your own stack. 

--- 

💌 Did you know we have a whole family of newsletters? Check out [JavaScript Weekly](https://javascriptweekly.com/), [Go Weekly](https://golangweekly.com/) and [Ruby Weekly](https://rubyweekly.com/) for a broader look at what we do.      

**RELEASES:**   

[pgsql_tweaks 1.0.0 Released](https://proopensource.it/blog/pgsql_tweaks-1-0-0-released) — A suite of functions and views that the author uses in her day job as a Postgres user, covering areas like checking data types, gathering statistics, WAL monitoring, finding unused indexes, and conversion functions. The [official homepage](https://pgsql-tweaks.org/) has docs for each feature. 

Stefanie Janine Stölting   

[pgstream: Postgres Replication with DDL Changes](https://github.com/xataio/pgstream) — A Go-powered Change Data Capture (CDC) command-line tool and library that offers Postgres replication support with DDL changes to targets including another Postgres database, Elasticsearch/OpenSearch, or [to a webhook.](https://github.com/xataio/pgstream/blob/main/docs/tutorials/postgres_to_webhooks.md) There's more info [in this blog post.](https://xata.io/blog/pgstream-v081-update) 

Xata   

- 🌐 [osm2pgsql 2.2](https://github.com/osm2pgsql-dev/osm2pgsql/releases/tag/2.2.0) – Import OpenStreetMap data into a Postgres/PostGIS database.
- [Stateless Postgres Query Router (SPQR) 2.7](https://github.com/pg-sharding/spqr) – An approach to horizontal sharding, originally built at Yandex Cloud.
- [VectorChord 0.5.2](https://github.com/tensorchord/VectorChord/releases/tag/0.5.2) – Scalable, fast, and disk-friendly vector search in Postgres.
- [River 0.25](https://github.com/riverqueue/river) – Robust Postgres-powered job processing system for Go apps.
- [pgwatch v4 Beta](https://www.cybertec-postgresql.com/en/pgwatch-v4-beta-is-out/)    

**Got a new email?** You can [change your address here](https://postgresweekly.com/edit_subscription/*|UID|*). 

--- 

**Bored of us?** [Click here to stop getting Postgres Weekly](https://postgresweekly.com/leave/*|UID|*). 

--- 

**Got a link for us?** Reply and tell us. We can't include everything but we'll look at anything you send. _Thanks!_ 

--- 

Published by Cooper Press Ltd.
Fairfield Enterprise Centre, Louth, LN11 0LS, United Kingdom 

Postgres, PostgreSQL and the Slonik Logo are trademarks or registered trademarks of the PostgreSQL Community Association of Canada. 

[Stop getting this newsletter](https://postgresweekly.com/leave/*|UID|*).
