Related:<p><i>The Internals of PostgreSQL</i> - <a href="https://news.ycombinator.com/item?id=43241404">https://news.ycombinator.com/item?id=43241404</a> - March 2025 (40 comments)<p><i>The Internals of PostgreSQL</i> - <a href="https://news.ycombinator.com/item?id=30372750">https://news.ycombinator.com/item?id=30372750</a> - Feb 2022 (19 comments)<p><i>The Internals of PostgreSQL</i> - <a href="https://news.ycombinator.com/item?id=30086374">https://news.ycombinator.com/item?id=30086374</a> - Jan 2022 (39 comments)<p><i>Internals of PostgreSQL</i> - <a href="https://news.ycombinator.com/item?id=18950460">https://news.ycombinator.com/item?id=18950460</a> - Jan 2019 (25 comments)<p><i>The internals of PostgreSQL</i> - <a href="https://news.ycombinator.com/item?id=13488315">https://news.ycombinator.com/item?id=13488315</a> - Jan 2017 (53 comments)<p><i>The Internals of PostgreSQL</i> - <a href="https://news.ycombinator.com/item?id=12142364">https://news.ycombinator.com/item?id=12142364</a> - July 2016 (1 comment)<p>(Reposts are fine after a year or so; links to past threads are just to satisfy extra-curious readers)
The latest Jepsen report on particledb triggered a new found interest in the SSI implementation in postgres.<p>If you are just skimming this doc, The HoT update path is the section I would jump to.<p>Understand HoT and then read the zHeap implementation notes (also of TOAST) puts a good mental model of what postgres does and what it doesn't do.
I have been developer since 2 years, from noob to beginner but I have used only two databases, one in MongoDB and second is pgsql. I have used others as well like firebase and redis and all but I am talking about in wide range. And it become super exciting for me to know internals of the pgsql.
Didn't find the new MVCC in there.<p><pre><code> https://www.orioledb.com/</code></pre>
Back in 2018, when I was at Greenplum, my team worked through The Internals of PostgreSQL together alongside Andy Pavlo’s CMU database courses. It was invaluable for anyone working on the database kernel. Today, a beginner can get that same interactive learning experience simply by chatting with AI, much like the discussions our team had back then.<p>Now I’m building Lavik, a new cache service for PostgreSQL. Traditional caches like Redis are DRAM-based, so they can only hold a small slice of hot data. Once your data outgrows memory, you’re exposed to cache miss storms, where a flood of requests falls through to PostgreSQL all at once. Nobody likes those. (OpenAI encounter the similar cache miss storms problem: <a href="https://openai.com/index/scaling-postgresql/" rel="nofollow">https://openai.com/index/scaling-postgresql/</a>)<p>Lavik takes a different path: it runs on NVMe SSDs, and it’s still faster than Redis running on DRAM. That’s not what most people expect. Conventional wisdom says SSD-based systems trade speed for capacity, but Lavik gives you both. You can keep TB-scale data in cache while getting 1M QPS and sub-millisecond P99 latency.<p>Lavik is open source under the Apache License.
GitHub: <a href="https://github.com/eloqdata/lavik" rel="nofollow">https://github.com/eloqdata/lavik</a>
Website: <a href="https://lavik.dev" rel="nofollow">https://lavik.dev</a>
Chapter 12 (full-text search) quietly changed under this book in Postgres 18: FTS now reads its dictionaries and config through the cluster's default collation provider instead of always libc, so clusters on ICU or the new builtin PG_UNICODE_FAST can see different behavior in FTS and pg_trgm — the release notes explicitly tell you to reindex those indexes after pg_upgrade. Also in 18, LIKE with nondeterministic collations stopped being an error, which was the main reason people avoided case-insensitive ICU collations on searchable columns.
The HOT chapter is the one with the most direct practical payoff. Two things worth knowing from it: HOT only kicks in when no indexed column changes and the new tuple fits on the same page, so an index on a frequently-updated column (status, updated_at) quietly disables it for every update to that table. And lowering fillfactor (say 80-90) on update-heavy tables leaves free space on each page so HOT can actually happen. Comparing n_tup_hot_upd to n_tup_upd in pg_stat_user_tables is a cheap way to see whether you're getting HOT updates before tuning anything.
Why does this comment sound AI generated?
Because it probably was. Pangram say it's too short to be certain but they think 100% of the text is possibly AI.<p>That doesn't mean the comment is useless, though. There's a whole philosophical discussion to be had here about whether what matters is the comment or the identity of the speaker.
Depends on how wide your columns are and how often your records are modified. Past a certain width and I’m not sure lowering fillfactor is a good idea.
I’ll be real, I use Postgres every day and I have no clue what you’re talking about
[dead]
[flagged]