# Vacuum at the Page Level: Watching PostgreSQL Reclaim Space Byte by Byte

> Hacker News story 48802660 · language: en · submitted 2026-07-06
> Web version: https://zeli.app/story/48802660
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 16 · by [radimm](<https://news.ycombinator.com/user?id=radimm>) · 💬 4
[original](<https://boringsql.com/posts/vacuum-at-the-page-level/>) · [HN discussion](<https://news.ycombinator.com/item?id=48802660>)

## Summary

I dive deep into how PostgreSQL's VACUUM command actually works by inspecting database pages before and after cleanup. While simple pruning handles some dead tuples, I explain the complex three-phase process required when indexes are involved. You will see exactly how storage is reclaimed, why line pointers stay reserved temporarily, and how the system manages dead tuple IDs to prevent index bloat.

## Key quote

> Pruning cannot simply mark a deleted tuple's line pointer LP_UNUSED, because indexes still point at it by TID.

---

## Cite

- Page: https://zeli.app/story/48802660
- Date: 2026-07-06
- Source: boringsql.com (https://boringsql.com/posts/vacuum-at-the-page-level/)
- Hacker News: https://news.ycombinator.com/item?id=48802660

## Other languages

- zh: https://zeli.app/zh/story/48802660 · markdown: https://zeli.app/zh/story/48802660.md
- ja: https://zeli.app/ja/story/48802660 · markdown: https://zeli.app/ja/story/48802660.md
- ko: https://zeli.app/ko/story/48802660 · markdown: https://zeli.app/ko/story/48802660.md
- de: https://zeli.app/de/story/48802660 · markdown: https://zeli.app/de/story/48802660.md
- es: https://zeli.app/es/story/48802660 · markdown: https://zeli.app/es/story/48802660.md
