Postgres relation files, filed under base/

· Radim Marek · Oct. 9, 2026, 7:08 a.m.
Summary
This blog post delves into the details of PostgreSQL relation files, explaining the naming scheme, file organization under the `base/` directory, and how tablespaces, relations, and their associated files interact on disk. It includes practical demonstrations using SQL functions and commands to illustrate how database tables are stored, related files such as TOAST tables, and the implications of operations like VACUUM and TRUNCATE on file naming and structure. The author uses personal insights and technical depth to explore PostgreSQL's internal workings, aimed at developers looking to understand PostgreSQL storage mechanics better.
AUTHOR