Book: Database Playbook
Also by me: Thinking in Go (2-book series) β Complete Guide to Go Programming + Hexagonal Architecture in Go
My project: Hermes IDE | GitHub β an IDE for developers who ship with Claude Code and other AI coding tools
Me: xgabriel.com | GitHub
Two requests to tag an article postgres arrive a few milliseconds apart. Both look up the tag. Neither finds it. Both insert it. One gets an id back. The other gets SQLSTATE 23505 , unique_violation , and your API returns a 500 for a request that did nothing wrong.
Get-or-create is the most boring query in your codebase, and the obvious ways to write it on PostgreSQL 18 are all wrong somewhere. Some race. Some return nothing. One writes to the table every time you read from it. On 12 February 2026, commit 88327092ff added INSERT ... ON CONFLICT DO SELECT , and it is in PostgreSQL 19 RC 1 , released 15 October 2026. GA is planned for 19 November 2026, barring delays.β¦