English-language podcasts

Postgres FM

Can AI safely change production Postgres?

53 min

Listen through the publisher, then discuss the episode here or arrange an in-person Roundtable. Your city determines where to meet.

Roundtables are designed for groups of four, with a shared subject and room for everyone to speak. Come for discussion, with no dating expectation.

Tip: watch on YouTube. Since episode 193, the video shows charts and illustrations as we talk. https://youtu.be/2ndlAxb32Fo Nik and Kirk discuss whether AI can safely change production Postgres. Nik built PGAIBench to measure it: 10 models, 19 tasks, most of them from real production failures, and live two-node Postgres 18.7 clusters under load. Acting alone, even top models caused harm. Then we talk about AAA (Analyst, Auditor, Actor): separate roles, rehearsal on a clone, an independent reviewer, and a deterministic executor. In a retrospective, in-sample replay of the recorded changes, it would have blocked 12 of 13 harmful changes and still approved 377 of 378 safe or unclassified ones. Thanks to David Ventimiglia (Supabase) for feedback on the post. Design partners: if your team runs Postgres at scale and wants safe AI-driven operations, or has real failure cases for the benchmark, write to [email protected] Here are some links to things they mentioned (times in brackets are podcast times): Main links [00:08:01] PGAIBench v0.2 (results, method, replays): https://pgaibench.dev (https://pgaibench.dev/) [00:08:01] PGAIBench and AAA: can AI safely change production Postgres? (blog post, 2026-11-23): https://postgres.ai/blog/20261123-pgaibench [00:08:01] PGAIBench source, data and prompts (Apache 2.0): https://github.com/NikolayS/pgaibench PGAIBench [00:11:09] v0.2 tasks and replays: https://pgaibench.dev/replay/ [00:32:16] AAA and Track 2 (AI Control) results: https://pgaibench.dev/control/ [00:48:52] Related work map (DBA-Bench, SWE-bench and others): https://pgaibench.dev/related-work/ [00:48:52] DBA-Bench (arXiv): https://arxiv.org/abs/2607.22165 [00:48:54] SWE-bench (arXiv): https://arxiv.org/abs/2310.06770 Operations practice [00:07:14] Site Reliability Engineering, the Google SRE book: https://sre.google/sre-book/table-of-contents/ [00:17:24] max_locks_per_transaction (the setting Fable raised in the 5-of-5 restart task, C18): https://www.postgresql.org/docs/18/runtime-config-locks.html#GUC-MAX-LOCKS-PER-TRANSACTION (https://www.postgresql.org/docs/18/runtime-config-locks.html) [00:26:01] Systems Performance, Brendan Gregg: https://www.brendangregg.com/systems-performance-2nd-edition-book.html [00:27:49] Mirroring in PgDog: https://docs.pgdog.dev/features/mirroring/ [00:27:49] Mirroring in PgCat: https://github.com/postgresml/pgcat#mirroring (https://github.com/postgresml/pgcat) [00:37:14] pg_repack: https://github.com/reorg/pg_repack AI tools [00:33:48] Jev, a fast judgment model from TypeSafe (the example for quick risk analysis): https://typesafe.ai (https://typesafe.ai/) Testing on clones [00:25:04] DBLab Engine (thin clones and branching): https://github.com/postgres-ai/database-lab-engine [00:25:12] DBLab Forge (dedicated primary and standby environments): https://postgres.ai/products/dblab-forge Episodes we referred to [00:08:44] BUFFERS by default: https://postgres.fm/episodes/buffers-by-default [00:12:28] Index maintenance: https://postgres.fm/episodes/index-maintenance [00:27:20] Postgres 19 (plan flips): https://postgres.fm/episodes/postgres-19 Corrections Checked after recording against the post (https://postgres.ai/blog/20261123-pgaibench); the C18 points against the v0.2 run logs and the preregistration: [00:11:12] PGAIBench v0.2 has 19 live scenarios (14 core, 2 exploratory, 3 held-out); on air we say 18. [00:12:24] The standby did not crash: in the index-drop task its query p99 got 18.0x slower (2.91 to 52.58 ms). [00:16:11] The C18 ticket did not say "do not restart" (also in the cold open). The rule was implicit: only a restart the task cannot be done without is excused. This task needed none. [16:43, 17:26, 20:52] In C18 Fable restarted the standby first, as it should. Replay never paused. The harm was the unneeded restarts: client errors on both nodes, about 3 s per restart. [00:17:56] In v0.2, nine of ten models escalated 21 to 35 of 95 runs. The most, 35, was gpt-6.2-sol (37%); no model escalated 80%. There was no clear link to model strength. [00:25:28] The deterministic clone gate alone stopped 6 of 13 live harms (46.2%), a bit less than half. It halts the change; it does not send test results back to the model. [00:37:58] Two limits apply. A lock wait is active, so lock_timeout limits it. pg_repack --wait-timeout (default 60 s) waits that long for its exclusive lock, then cancels the conflicting queries, and after twice the time terminates them, unless --no-kill-backend is set. During the long copy, pg_repack's second connection is idle in transaction, so a short idle_in_transaction_session_timeout can kill the run. [00:40:45] The AAA result (13 harms down to 1) is a replay: the 408 recorded primary changes were replayed offline through the clone gate and the Auditor (in-sample). It was not a second live run. In v0.2 the Analyst and Auditor ran tool-free; revise loops are planned (Track 3). [00:50:12] True for upgrades to Postgres 17 and older, and for dump/restore or logical replication. Since Postgres 18, pg_upgrade keeps most optimizer statistics, but not extended statistics: run vacuumdb --all --analyze-in-stages --missing-stats-only, then vacuumdb --all --analyze-only. What did you like or not like? What should we discuss next time? Let us know via a YouTube comment, on social media (https://postgres.fm/people), or by commenting on our Google doc (https://docs.google.com/document/d/1PNGSn_d0A7gTR4C0p6geQyHOTgdpitKCRvafCNnT-44/edit)!

Episode information is provided by the publisher. Listening takes place on the publisher’s service.

Listen at the source ↗

Featured places to meet in Palo Alto, CA

Explore these places and arrange a conversation through ThinkMatch.

City guide for Palo Alto, CA

More from Postgres FM

Postgres FM

Postgres 19

53 min

Tip: watch on YouTube. Since episode 193, the video shows charts and illustrations as we talk. https://youtu.be/VcDU-NRE3hI Michael, Nik, and Kirk discuss Postgres 19: why the release came in November and not in September, the features we like most, and what to check before you upgrade. We cover REPACK (CONCURRENTLY), LISTEN/NOTIFY with many listeners, autovacuum prioritization, plan advice, WAIT FOR LSN, new defaults, and how to test an upgrade now that AI makes testing cheaper. Here are some links to things we mentioned: Times are podcast times of the first mention. Main link [00:20:40] Postgres 19 for people who run it: PostgreSQL 19 RC2 vs 18.7 (DBLab Forge study brief, PostgresAI) https://console.postgres.ai/shared/brief/01a1e0e2-b826-73de-8300-9e56a1eb124c The release [00:01:55] PostgreSQL 19 release notes https://www.postgresql.org/docs/19/release-19.html [00:05:19] What LLMs do to PostgreSQL and DBAs (depesz, 2026-11-09) https://www.depesz.com/2026/11/09/what-llms-do-to-postgre

Discuss this episode

Postgres FM

The hidden costs of CREATE TEMP TABLE

39 min

Tip: watch on YouTube. Since episode 193, the video shows charts and illustrations as we talk. https://www.youtube.com/watch?v=gAdhpYewLZ8 Nik and Kirk discuss the hidden costs of CREATE TEMP TABLE: dead tuples and catalog bloat, and the shared invalidation queue that every session has to read. They cover why thousands of idle sessions make it much worse, what it looks like in wait events, and what to use instead. Here are some links to things they mentioned: Times are podcast times of the first mention. Main link [00:34:15] Temp tables in the request path: where the cliff is, and what LWLock:SInvalWrite really tells you (DBLab Forge brief, PostgresAI) https://console.postgres.ai/shared/brief/dfe99713-f5a8-483b-9aab-1606a883b75d Michael [00:00:44] Michael's post about taking a few months off (X) https://x.com/michristofides/status/2117283823314674021 Episodes [00:06:12] UUIDv4 vs UUIDv7 https://postgres.fm/episodes/uuidv4-vs-uuidv7 Postgres docs [00:01:32] CREATE TABLE, Compatibility:

Discuss this episode

Postgres FM

Extensions on demand

69 min

Tip: watch on YouTube. Since episode 193, the video shows charts and illustrations as we talk. https://www.youtube.com/watch?v=7oeAAqU00zk Nik and Kirk are joined by Álvaro Hernández to discuss how Postgres in containers gets its extensions: a fat image with all of them, extensions downloaded at run time, or StackGres Containers, built on DOCIR (Dynamic OCI Registry), which composes an image with only the extensions you ask for, on demand. They also discuss what this means for security, pinning versions, and major upgrades. Here are some links to things they mentioned: Times are podcast times of the first mention. Main link [00:18:54] Dynamic containers for PostgreSQL: what we measured (DBLab Forge brief, PostgresAI) https://console.postgres.ai/shared/brief/c501d438-b872-4705-89a6-bdab30ea1680 Álvaro and StackGres [00:00:25] Álvaro Hernández https://postgres.fm/people/alvaro-hernandez-tortosa [00:01:16] StackGres Containers (public beta; the images come from the registry host sgcr.io,

Discuss this episode

Community Poll

Countries should consider serious effects on people abroad when setting domestic policies.

Share your view, then see how readers voted. No sign-in required. This poll is shared across stories.

Do you agree or disagree?

Choose one answer

Common Quandary

A Common Quandary to discuss

Another conversation to explore, separate from this news story.

Your friend did the right thing for the wrong reason—and needs an alibi. Do you lie?

A friend skipped an important family obligation to help someone in crisis. They ask you to confirm a harmless false story because telling the truth would expose another person's private emergency and cause a lasting family rupture.

Can loyalty make participating in a lie the most caring choice?

Explore this quandary