Nikolay Samokhvalov

Things Nikolay Says on Podcasts

Founder of Postgres.ai, working on tools for safe schema changes and query optimization in Postgres. Focuses on database internals topics such as autovacuum tuning, transaction id wraparound, index bloat, logical replication, and connection scalability, drawing on consulting work with teams running Postgres at scale. Co-hosts Postgres FM, a weekly podcast on Postgres internals and operations, together with Michael Christofides of pgMustard. Speaks regularly at Postgres community events including PGConf and FOSDEM.

Where to Find Them

Nikolay Samokhvalov hosts and writes Postgres FM .

Recently: “UUIDv4 vs UUIDv7” on Postgres FM (October 2026); “Dump/restore done. Now what?” on Postgres FM (October 2026); “Citus + StackGres” on Postgres FM (October 2026); “GSoC B-Tree Merge” on Postgres FM (September 2026); “GSoC B-Tree Merge” on Postgres FM (September 2026); “ClickHouse Managed Postgres” on Postgres FM (September 2026).

What They Said

The hosts had just found that random UUIDs slow inserts once an index no longer fits in memory. Samokhvalov estimates what that means for the bill on Aurora, which charges per I/O, and is careful to call it an estimate rather than a benchmark result.

Postgres FM · 2026-10-30 Permalink → Listen →
Postgres FM Around 17:40 into the episode
Nikolay Samokhvalov

…say, like, oh, like with UID version 4, you write like 10% more wall. It's hard to say because it will be purely synthetic. And in real systems, a lot of things are writing to wall, including autovacuum, right? So, but definitely with UD version 4, it's somewhat bigger in terms of wall rates. And

Kirk Wolak

…challenge is when the checkpoint comes, so it's not just the number of rows you write. It's the number of rows and the number of leaf pages they fit into and the frequency of checkpoints. Those three things are working into you. And it makes up, I understand, about half of the loss of performance.

Nikolay Samokhvalov

Yeah. So a few days ago, when we still had iterations for Forge running, remember we discussed that you mentioned, I mentioned Aurora and you also mentioned that I don't remember exact question, but you pointed to some ideas that Aurora doesn't have checkpoints. And maybe there is no such benefit of having UID version 7 on Aurora because it doesn't have like how wall is organized, right? Like if there are no full page write is off on Avarora. So there's no this effect of touching the whole page and the need to compress it. By the way, For non-Aurora, we should have compression on. LZ4, ZSTD, this is probably another Forge experiment, right? But we compress it. And on Avarora, this is not needed. And I was like, oh, yeah, like, unfortunately, yeah, because I like Aurora because they charge you for IO, and your work on performance on query performance optimization is exactly like can be measured in dollars. This is good. So I asked Forge to the next round to explore that. Well, not with Aurora, just like understanding what to expect. And we have numbers. Numbers are impressive. So numbers…

Kirk Wolak

And to be clear, when we first did the ULID and UUID v7 work, one of the people who ran into this problem, it was a cost issue with Amazon. And that's what caused them to look into the problem. So it was at the brand. It was Aurora. Yeah. So they were using Aurora and it was a massive increase…

Nikolay Samokhvalov

Yeah. Yeah, yeah. So inserts, like there is degradation at inserts rate, but also in some systems, you start paying for additional I.O. Yeah. So should we say that this is a kind of performance cleave? It's not like acute cleave, but you know, like in real world, not all cliffs are like this.…

Kirk Wolak

of like a performance hill, but let's be honest. When do we care? And I'm a hot sauce advocate from years ago. And their answer was always the right answer late is the wrong answer. And I kind of like that. And they said, if speed's important to you, timing must be built into your system. So part…

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

Collections They Appear In