---
title: "A gofmt-style formatter for SQL"
publication: "Postgres Weekly"
issue: 661
published_at: "2026-08-12"
canonical_url: "https://postgresweekly.com/issues/661"
---

Plus PostgREST 16, Neon picks up PGlite, and 5 Postgres hits you may have missed.        

#​661 — August 12, 2026 

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

🏖️ **We're taking a summer break next week,** so the next issue will be on August 26.
__
_Your editor, Peter Cooper_ 

Together with [![ParadeDB\](https://res.cloudinary.com/cpress/image/upload/c_fill,g_auto,e_trim,w_1280,h_164/e_make_transparent/co_white,e_outline:17/cdd8ciarsq6m8xam8oc3.png)](https://paradedb.com/cloud)   

Postgres Weekly 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/mmevx99yjrirxdxontes.jpg)](https://tapoueh.org/blog/2026/08/introducing-sqlfmt-an-sql-gofmt-style-formatter/)  

[Introducing `sqlfmt`: An SQL `gofmt`-Style Formatter](https://tapoueh.org/blog/2026/08/introducing-sqlfmt-an-sql-gofmt-style-formatter/) — Postgres contributor Dimitri has developed his own way to style SQL over time (as used in his book, [_The Art of PostgreSQL_](https://theartofpostgresql.com/)) and built a Go tool to apply it automatically. Better still, [you can use it on the Web](https://theartofpostgresql.com/postgresql-sql-formatter/), so if you're prepping a presentation or blog post, give it a try on your queries. 

Dimitri Fontaine   [![\](https://res.cloudinary.com/cpress/image/upload/c_limit,w_480,h_480,q_auto/copm/358d08eb.png)](https://paradedb.com/cloud) 

[Coming Soon: ParadeDB Cloud](https://paradedb.com/cloud) — We're building a fully managed ParadeDB: one Postgres for your application data, full-text search, vector retrieval, and aggregations. Our early access waitlist is open now. 

ParadeDB sponsor   

[The Dangers of Postgres Subtransactions](https://planetscale.com/blog/the-dangers-of-postgres-subtransactions) — A transaction with more than 64 subtransactions can bring a cluster to a crawl. A `pgbench` run shows throughput falling from 7,200 TPS to 160 TPS, and it gets worse: a new read replica can refuse connections entirely. 

Nidzwetzki and Berube (PlanetScale)   

**IN BRIEF:** 

- ⏰ **Postgres's quarterly minor releases are expected tomorrow, August 13.** Nothing has been announced as we go to press, but since we're away next week you'll want to [check the release notes](https://www.postgresql.org/docs/release/) yourself — expect updates across every supported branch.
- _Electric_, the team behind [PGlite](https://pglite.dev/) (Postgres compiled to WASM) and the Electric sync engine, is [joining the Neon team at Databricks](https://neon.com/blog/electric-joins-neon). Here's [Electric's side of the story](https://electric.ax/blog/2026/08/11/electric-joining-databricks).
- **QUICK RELEASES:** [pg_clickhouse 0.10.0](https://clickhouse.com/blog/pg_clickhouse-whats-new-july-2026), [PostgREST 16.0](https://github.com/PostgREST/postgrest/releases/tag/v16.0) (and [16.1](https://github.com/PostgREST/postgrest/releases/tag/v16.1)), [Citus 14.2](https://github.com/citusdata/citus/releases/tag/v14.2.0), [Doltgres 1.0](https://www.dolthub.com/blog/2026-08-06-doltgres-1-0/), [pgAdmin 4 9.17](https://www.pgadmin.org/docs/pgadmin4/9.17/release_notes_9_17.html), [E-Maj 5.0](https://www.postgresql.org/about/news/announcing-e-maj-500-3353/)   

[Rebuilding Postgres for 300x Faster Analytics](https://malisper.me/how-we-made-postgres-hundreds-of-times-faster-the-query-engine/) — The creator of [pgrust](https://github.com/malisper/pgrust), an attempt to rewrite Postgres in Rust, reflects on the power of batching, operator fusion and SIMD in a query engine. 

Michael Malis   

[Introducing `pg-java`: A New Postgres Driver for the JVM](https://launchbylunch.com/posts/2026/Jul/29/introducing-pg-java/) — A long-time [pgjdbc](https://github.com/pgjdbc/pgjdbc) maintainer explains why he created a from-scratch, Postgres-first JVM driver built on virtual threads: [pg-java](https://github.com/pgjdbc/pg-java). It's still considered _pre-release_though. 

Sehrope Sarkuni   

📄 [Modelling State Transitions in Postgres](https://thoughtbot.com/blog/modeling-state-transitions-in-postgres) – When an attribute changes over time and those changes matter, model it as a separate table of timestamped rows. Thiago Araújo Silva 

📄 [Choosing the Right Postgres Partition Key](https://stormatics.tech/blogs/choosing-the-right-postgresql-partition-key) – You can partition a huge table 'perfectly', yet still have the slow queries stay just as slow… Umair Shahid (Stormatics) 

📄 [Making Postgres's Documentation Even Better](https://www.fromdual.com/blog/postgresql/improve-postgresql-documentation/) – The practical elements of landing a docs fix in Postgres. Oli Sennhauser 

📄 [Multi-Tenant BYOK Encryption in Postgres with `pgcrypto`](https://xata.io/blog/multi-tenant-byok-encryption-in-postgresql-with-pgcrypto) Tudor Golubenco       

📰 Classifieds   

Turn a live stream of machine data into real-time dashboards, all on Postgres. Free hands-on workshop, Sep 9. [Save your spot](https://www.tigerdata.com/events/workshop-ignition-meets-tiger-cloud?utm_source=content-syndication&utm_medium=referral&utm_campaign=postgres-weekly-newsletter). 

--- 

🚀 Triple your Postgres productivity. [pgEdge AI DBA Workbench](https://pgedge.com/download/ai-dba-workbench): AI monitoring & diagnostics for ANY Postgres v14+. [Open source](https://pgedge.com/download/ai-dba-workbench).      

**HITS OF THE YEAR SO FAR:** 

As we're taking a week off, this is a natural moment to reflect and shine a spotlight on some of the best items of 2026 so far. We know not everyone has time to read _every_ issue, so there are likely to be some highlights you missed… :-) 

A small selection from the top items (by clicks): 

1. [Postgres is Enough](https://postgresisenough.dev/) – A useful directory of how Postgres can replace other systems including Redis, Elasticsearch and Kafka.
2. [`work_mem`: It's a Trap!](https://mydbanotebook.org/posts/work_mem-its-a-trap/) – An enjoyable tale of two experienced Postgres developers digging into just how a server with 2TB of RAM (and a `work_mem` setting of just 2MB) got taken down by a badly written query.
3. [How Moving One Word Can Speed Up a Query 10–50x](https://postgres.ai/blog/20260311-not-exists-vs-exists-partial-index) – One of those _"but… how?"_ moments where two logically equivalent queries led to a 32x difference in performance.
4. [Postgres Locks Explained](https://postgreslocksexplained.com/) – _"It's the resource I wish existed when I first started learning about locks"_, said the author of this site focused on explaining the different types of lock used in Postgres in an easy-to-understand way.
5. [Life Altering Postgresql Patterns](https://mccue.dev/pages/3-11-25-life-altering-postgresql-patterns) – Twelve bite-size tips and insights from using UUIDs as primary keys and table naming to the use of schemas and views. This one snuck in from [issue 630](https://postgresweekly.com/issues/630)'s look at the best items of _2025_ but I think we can get away with running it just one… more… time…    

Before I leave, I want to thank all of you who have sent in submissions recently. I've amassed quite a queue to go through, and I'm not exactly sure how long it'll take. Rest assured, though, I read every single one and will be including some in future issues :-) 

👋 We're now off for a week – see you again on August 26!    

**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|*).
