Mats Kindahl: Building a Table Access Method, Part 9: UNLOGGED tables and surviving a restart
Mats Kindahl has published Part 9 of his series on building a PostgreSQL table access method, focusing on how pg_memtable tables behave across server restarts. Because MemTables store data in shared memory, a restart destroys the arena while the table record in pg_class survives, pointing to data that no longer exists. The post explains table persistence, how unlogged tables handle crash recovery and controlled restarts, how to make every MemTable unlogged so Postgres treats them correctly, and how to recreate a table's arena after a restart.
AI-written summary, checked against the cited sources. How summaries work