Postgres relation files, filed under base/ 0 ▲ boringSQL | Supercharge your SQL & PostgreSQL powers 52 minutes ago · 14 min read2755 words · Tech · hide · 0 comments The buffers article followed an 8KB page from disk into shared memory and back. What it didn't do is name the file. Every page that passes through the buffer pool is block number N of some file under the data directory, and the file has a naming scheme, a size limit, and companion files that share its name. Before the next article reads the inside of a page, this one finds it on disk with ls and od, and shows that the bytes are the same ones. Nothing here needs more than a scratch database and shell access to its data directory. The examples were captured on PostgreSQL 18.6 with data checksums on, which is the default since 18. Setup CREATE EXTENSION IF NOT EXISTS pageinspect; CREATE TABLE files_demo ( id integer GENERATED ALWAYS AS IDENTITY PRIMARY KEY, title text NOT NULL, value numeric(10,2) ); INSERT INTO files_demo (title, value) SELECT 'row_' || i, i * 1.5 FROM generate_series(1, 1000) AS i; A thousand short rows and a primary key. The text column is there so a TOAST table gets… No comments yet. Log in to reply on the Fediverse. Comments will appear here.