---
title: "The tale of an unanticipated concurrency and locking gotcha"
publication: "Postgres Weekly"
issue: 637
published_at: "2026-02-25"
canonical_url: "https://postgresweekly.com/issues/637"
---

Plus the out-of-cycle Postgres release drops tomorrow, and queryable active session history for post-incident investigations.       

#​637 — February 25, 2026 

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

Together with [![pgEdge\](https://res.cloudinary.com/cpress/image/upload/c_fill,g_auto,e_trim,w_1280,h_294/e_make_transparent/co_white,e_outline:17/fnv5xiqc6lewnu21fbch.png)](https://www.pgedge.com/?masthead)   

Postgres Weekly 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/j0rsq6gvmpu39cchsm3z.jpg)](https://hakibenita.com/postgres-row-lock-with-join)  

[How Row Locks with Joins Can Produce Surprising Results](https://hakibenita.com/postgres-row-lock-with-join) — A non-null foreign key and a valid constraint should guarantee an inner join always returns a row.. right? This post covers a real edge case where _nothing_ might be returned in such a scenario (due to an easily unanticipated concurrency and locking gotcha), explains why, and offers several solutions. 

Haki Benita   [![\](https://res.cloudinary.com/cpress/image/upload/c_limit,w_480,h_480,q_auto/copm/8d1b3557.png)](https://www.pgedge.com) 

[Enterprise Grade Postgres for Agentic AI, High Availability and More](https://www.pgedge.com) — pgEdge delivers open-source, 100% Postgres infrastructure for Agentic AI and enterprise apps that demand high availability, reliability, and data sovereignty. We make it easy to build, deploy and manage enterprise‑grade Postgres apps at scale. 

pgEdge sponsor   

**IN BRIEF:** 

- ⚠️ [Postgres's 'out of cycle release' is expected tomorrow.](https://www.postgresql.org/about/news/out-of-cycle-release-scheduled-for-february-26-2026-3241/) It's intended to resolve regressions introduced in the [recent Postgres 18.2, 17.8, 16.12, 15.16, and 14.21 releases.](https://www.postgresql.org/about/news/postgresql-182-178-1612-1516-and-1421-released-3235/)
- 🇨🇦 [The schedule for PGConf.dev](https://2026.pgconf.dev/schedule/tuesday), taking place in Vancouver this May 19-22, is now live.
- 🇩🇪 [The schedule for PGConf.DE 2026](https://www.postgresql.eu/events/pgconfde2026/schedule/) is now live. It takes place on April 21-22 in Essen, Germany.   

[Harnessing Postgres Race Conditions](https://www.lirbank.com/harnessing-postgres-race-conditions) — An explanation of how synchronization barriers let you manufacture race conditions on demand in testing, and how to verify your locks are actually doing what you think they are. 

Mikael Lirbank   

[Why the C Collation is the Best Choice for Your Cluster](https://www.cybertec-postgresql.com/en/c-collation-best-for-postgresql-clusters/) — How to avoid the index corruption trap that can hit after OS upgrades by using the simple C collation, rather than a natural language one. But then what if you _want_ natural language collation for day to day use? Laurenz shows how to get the best of both worlds. 

Laurenz Albe   

▶[Why It's Fun to Hack on Postgres Performance](https://talkingpostgres.com/episodes/why-its-fun-to-hack-on-postgres-performance-with-tomas-vondra) — Microsoft’s Tomas Vondra is a long-time Postgres contributor known for performance work. In this 80 minute interview, he explains why perf hacking is hard but fun, walks through a hash join optimization he contributed, and shares why Postgres’ “community vibe” keeps him coming back for more. 

Talking Postgres Podcast podcast   

📄 [9 Postgres Features I Wish I Knew Sooner](https://marmelab.com/blog/2026/02/23/do-you-know-psql.html) – Including `EXCLUDE` and `CHECK` constraints, `DISTINCT ON`, `FILTER`, and recursive CTEs. Thiery Michel 

📄 [What Does `INSERT 0 1` Actually Tell You?](https://mydbanotebook.org/posts/what-does-insert-0-1-actually-tell-you/) – A short and sweet look at something you’ve seen before but perhaps never thought about. Lætitia Avrot 

📄 [Coming to Postgres 19: `%i` Prompt Escape to Indicate Hot Standby Status](https://www.depesz.com/2026/02/21/waiting-for-postgresql-19-psql-add-i-prompt-escape-to-indicate-hot-standby-status/) – `%i` in your `psql` prompt will let you see if you’re connected to the primary or a standby at a glance. Hubert Lubaczewski 

📄 [Making Large Postgres Migrations Practical: 1TB in Two Hours with PeerDB](https://clickhouse.com/blog/practical-postgres-migrations-at-scale-peerdb) Amogh Bharadwaj (ClickHouse)    

**RELEASES AND CODE:**  

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/vvy3kjykzsd7atoie8og.jpg)](https://github.com/riii111/sabiql)  

[sabiql: A Driver-Less TUI for Working with Postgres](https://github.com/riii111/sabiql) — A Rust-based terminal UI for Postgres that wraps `psql`, so no drivers are involved. Unlike `psql`, however, you get ER diagram generation, inline cell editing, a quick way to copy values to the clipboard, fuzzy search, and more. 

riii111   

[pg_ash: Active Session History for Postgres](https://github.com/NikolayS/pg_ash) — A pure SQL and PL/pgSQL approach (so it’ll even work on managed platforms). It samples `pg_stat_activity` every second and stores the results in a compact format you can query with SQL later to dig into problems you didn’t catch in real time. 

Nikolay Samokhvalov    

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