Get the latest tech news

How Postgres stores data on disk – this one's a page turner


A high-level overview of how PostgreSQL stores data on disk, covering segments, pages and more.

In fact, it’s easy to think of databases like a black box where you make sure your tables are indexed sensibly and your queries aren’t doing anything silly, and the rest just happens. You should see a bunch of text saying all kinds of interesting things like selecting dynamic shared memory implementation ... posix and performing post-bootstrap initialization ... ok and then eventually LOG: database system is ready to accept connections. This would still be a fairly large undertaking to do this, and in real life you’d probably call in a professional data recovery specialist, but maybe in this imaginary scenario your company can’t afford one so you have to make do.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of disk

disk

Photo of page turner

page turner

Photo of Postgres stores data

Postgres stores data

Related news:

News photo

Linux 6.10 Makes AES-XTS Disk/File Encryption Much Faster For Modern Intel/AMD CPUs

News photo

Umbra: A Disk-Based System with In-Memory Performance [pdf]

News photo

Linux 6.10 AES-XTS For Disk/File Encryption As Much As ~155% Faster For AMD Zen 4 CPUs