Postgres FM (@PostgresFM) header
Postgres FM (@PostgresFM) profile picture

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
Photo by Postgres FM (@PostgresFM)Photo by Postgres FM (@PostgresFM)Photo by Postgres FM (@PostgresFM)Photo by Postgres FM (@PostgresFM)Photo by Postgres FM (@PostgresFM)Photo by Postgres FM (@PostgresFM)Photo by Postgres FM (@PostgresFM)Photo by Postgres FM (@PostgresFM)Photo by Postgres FM (@PostgresFM)Photo by Postgres FM (@PostgresFM)
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. 👇
1
8
24
879
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
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 👇
1
1
2
745
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
Don't miss Postgres 19 episode 🐘🚀 Michael, Nik, and Kirk talk about features they like most and first exciting PG18 vs. PG19 numbers from DBLab Forge benchmarks 📈
3
2
1
17
660
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 🧵👇
5
3
1
16
1,549
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.
1
1
4
305
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…
1
4
343
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👇
1
4
17
1,367
Álvaro's answer, in 65 seconds (sound on): you ask for Postgres + citus + ltree + unaccent, and you get one image with only those. Nothing more. This is StackGres Containers (public beta), built on DOCIR, a dynamic OCI registry.
1
1
4
352
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
1
1
9
486