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

Databases are magical, with SQL as the language that unleashes their power. PostgreSQL, the most popular database for developers, stores data in a directory that holds essential files and folders. Understanding terms like transaction, snapshot, schema, table, and more gives insight into database structure. Exploring the folders reveals system databases like postgres, template0, template1 automatically created when starting up PostgreSQL. Creating a new database, loading data about countries, and examining it through psql in a Docker container provides hands-on insight into managing and manipulating data. Diving into the inner workings of databases is both complex and fascinating, shedding light on how data is structured and accessed.

https://drew.silcock.dev/blog/how-postgres-stores-data-on-disk/

To top