
A weekly podcast about all things PostgreSQL — by @michristofides and @samokhvalov. Also at https://www.nitter.cf/t.co/lQaOt18aZ0
🎧 Podcast + 📺 YouTube
Joined July 2022
- Tweets274
- Following3
- Followers2.2K
- Likes108
Postgres 19 finally brings REPACK (CONCURRENTLY) 🐘
It looks amazing in our lab (DBLab Forge):
- 17x faster than pg_repack
- 336x less lag than pg_squeeze
- Plays nice with autovacuum
The catch: one slow query can freeze your app or wipe out hours of work.
👇
Now the catch (@yugedilbertfan caught this on air).
At the end, REPACK needs an exclusive lock to swap tables.
If one 60s SELECT is running:
- No lock_timeout -> app freezes for 57 s
- lock_timeout=2s -> REPACK gives up and throws away hours of work
1
1
121
Learn more in new @postgresfm episode with @yugedilbertfan:
Full episode: youtube.com/watch?v=Xl6sYpE8…
(and in Spotify, Apple Podcasts, etc.)
DBLab Forge brief: console.postgres.ai/shared/b…
We all let AI write code now – with proper guardrails, it works really well.
But what about Postgres changes in production?
To study it, Nik built PGAIBench:
- 19 cases, most from real prod failures
- Testing LLMs on live 2-node PG18 clusters under load
New podcast episode 👇

ALT Scatter chart, PGAIBench Track 1: 10 AI models acting alone on live Postgres clusters, 949 runs. X axis: usefulness, % of runs correct. Y axis: safety, % of runs without harm, shown from 90% (0-90% cut). No model reaches the goal box (80%+ useful, 98%+ safe). Sonnet 5.5 is closest, at 68% useful and 100% safe; Grok 4.7 is lowest on safety, at 92.6%.
Acting alone, 10 models made 13 harmful changes in 408 changes to the primary.
Not only weak models: a top model restarted nodes that needed no restart, in 5 of 5 runs of one task.
Not stupid. Overconfident.
1
138
The fix looks like what works for code: guardrails.
- Rehearse every change on a live clone: 6 of 13 harms stopped, no AI in it
- AAA (Analyst, Auditor, Actor): 12 of 13 blocked in offline replay
Data and code: pgaibench.dev
59
Postgres 19 is out and this was a great reason for @michristofides to join Nik and Kirk to talk about it!
youtube.com/watch?v=VcDU-NRE…
CREATE TEMP TABLE in every transaction: 3,931 tx/s 🐢
Same query as a CTE: 88,531 tx/s 🐘🚀
New Postgres FM with @yugedilbertfan and @samokhvalov: why it happens, and what to use instead
With many idle sessions, DDL waits on LWLock:SInvalWrite
Ever seen this one?
thread 🧵👇
Idle sessions are not free. We asked for 500 temp-table tx/s and got:
- 0 idle: 502
- 1,000: 502
- 3,000: 274
- 5,000: 127
At 5,000, the DDL sessions spend 91% of their active time waiting on LWLock:SInvalWrite (PG18, 16 vCPU, synthetic).
First aid: cut idle sessions.
The fix: no temp tables in hot code
- CTE: 88,531 tx/s
- PL/pgSQL arrays, records
- if you must: reuse one, ON COMMIT DELETE ROWS: 17,741 tx/s
Brief (DBLab Forge): console.postgres.ai/shared/b…
Listen (Spotify, Apple, any app): postgres.fm/episodes/the-hid…
Watch: youtube.com/watch?v=gAdhpYew…
pgvector as its own container image: 0.31 MiB.
A fat Postgres image with 18 extensions: 253 MiB.
Both still cost the same restart to add.
New episode with Álvaro Hernández @ahachete and Kirk Wolak @yugedilbertfan on extensions for Postgres in containers.
New episode link👇
Podcast and transcript: postgres.fm/episodes/extensi…
Video: youtu.be/7oeAAqU00zk?z
Postgres FM retweeted
We discuss it on @PostgresFM
Why does a random UUID slow down inserts once the index outgrows memory?
Kirk Wolak explains it in rally well in 75 seconds:
UUIDv4 → each insert lands on a random leaf. Those leaves get evicted, so inserts keep reading pages back from disk.
UUIDv7 → every new key is to the right of the last one. Only the last page is touched. Same as bigint identity.
Full episode: youtu.be/gf8e3JkQ_8M
Postgres FM retweeted
postgres.ai/blog/20261105-uu…
Our first run said int8 inserts 12% faster than UUIDv7.
Wrong. Each key ran on its own server, and the int8 server had a faster disk.
Same server, same 71M rows: 23,458 vs 23,131 rows/s. A tie.


