Skip to content

Egor Rogov · English manuscript

PostgreSQL 18 Internals

MVCC and snapshot isolation, the buffer cache and write‑ahead log, locks, query execution, and index access methods, examined from inside a running PostgreSQL 18 server.

Download the Russian original (PDF)

About this book

For readers who won’t settle for a black box

This book is for those who will not settle for a black-box approach when working with a database. If you are eager to learn, prefer not to take expert advice for granted, and would like to figure out everything yourself, follow along.

This book is not a collection of recipes. You cannot find ready-made solutions for every possible occasion, but if you understand the inner mechanisms of a complex system, you will be able to analyze and critically evaluate other people’s experience and come to your own conclusions.

— Egor Rogov, About This Book

Contents

From isolation and MVCC to index access methods

Part II

Buffer Cache and WAL

The buffer cache, and the write-ahead log that restores consistency after a failure.

  1. 9Buffer Cache
  2. 10Write-Ahead Log
  3. 11WAL Modes

Part III

Locks

Lightweight locks for RAM, heavyweight locks for relations, and row-level locks.

  1. 12Relation-Level Locks
  2. 13Row-Level Locks
  3. 14Miscellaneous Locks
  4. 15Locks on Memory Structures

Part V

Types of Indexes

Index access methods beyond the B-tree, their extensibility and each method in turn.

  1. 24Hash Indexes
  2. 25B-tree Indexes
  3. 26GiST
  4. 27SP-GiST
  5. 28GIN
  6. 29BRIN

Editions

One book in three languages

The text, figures, cover, and publication material belong to PPG LLC (ООО «ППГ») and DMK Press; see the title page and publication details. The editions here are for reading online. Ask the rights holders before republishing or redistributing them.