NS Nikolay Samokhvalov Nikolay Samokhvalov Founder of Postgres.ai, working on tools for safe schema changes and query optimization in Postgres.

“When you build something it's hard to step outside and review your own work. It's just psychologically hard, and the same with AI. If it has a goal to build something, it's too positive, trying to achieve the goal. While if you have another AI whose goal is to find problems, it will find problems.”

Postgres FM · Hands-On Engineering Podcasts · November 2026

“When you build something it's hard to step outside and review your own work. It's just psychologically hard, and the same with AI. If it has a goal to build something, it's too positive, trying to achieve the goal. While if you have another AI whose goal is to find problems, it will find problems.” — Nikolay Samokhvalov, Postgres FM

Context

Nik is explaining why the AI that proposes a database change and the AI that audits it must be separate, with separate context.

Transcript

Postgres FM Around 32:59 into the episode
Nikolay Samokhvalov

…and especially if you talk again if you talk about corner cases when multiple problems collide and you have incident which was overlooked in testing right so next thing is like first thing testing is great of course it's obvious right it's the problem is how much of time and money it costs well

Kirk Wolak

…if you have read replicas you must have them in your test environment otherwise it's going to give you a recipe that's destined to potentially have problems in production like and so many people myself included have skimped on that at times only to pay a price you don't want to pay trust me right

Nikolay Samokhvalov

right the separation of roles right yeah this is how it works with humans as well uh if you're working alone it's hard you know like when you build something it's hard to step outside and and review your own work it's just psychologically hard and the same with ai if it has a goal to build something it's too positive uh trying to achieve the goal to build while if you have another ai who whose goal is to find problems it will find problems right so already this separation one is building another is auditing reviewing it is already it definitely makes sense here as well we have it for code also right like we build code with one ei and review it with another ai hopefully and like i definitely we we decided it to do it i think in january we separated the context because if you let review the same ai which has goal to build it will probably be too optimistic uh and yeah so so the same we call

Kirk Wolak

it hypnotizing you can hypnotize also if you give the other ai all the same feedback even if you're using a different ai it could get hypnotized into how you describe the problem and seeing the other solution is more valid than it is convinced yeah yeah convinced right whereas i want it to start…

Nikolay Samokhvalov

it so right but the big big trick for me is to do it in a separate engine with different contexts absolutely we don't know we don't remember how we developed and we don't convince ourselves that this is the best way probably we overlooked something and the auditor role is great so since uh last…

Kirk Wolak

say better yeah we need well we have a responsibility to manage it better to manage one

Speaker names come from our own diarization. The position is estimated from where the line sits in the episode.

More from Postgres FM