Skip to content
Opensource internals
  • Posts

Storage

How PostgreSQL Stores a Row

Oct 20, 2026 25 min read Jay Hubbert

Every database gives you a row and every database lies a little about what that row is. MySQL gives you a record copied into a row buffer. SQLite gives you a record in a b-tree …

PostgresStorageInternals

Read more →

How PostgreSQL Locks Buffers Without LWLocks

Oct 2, 2026 42 min read Jay Hubbert

Every time PostgreSQL reads a page it does two things: it pins the shared buffer that holds the page, and it takes a content lock on that buffer so that nobody rewrites the bytes …

PostgresPerformanceStorageConcurrencyInternals

Read more →

How PostgreSQL Computes Page Checksums Fast

Sep 5, 2026 29 min read Jay Hubbert

Every page PostgreSQL writes to disk gets a checksum: two bytes in the page header that let the server notice, on the next read, that the page it just read is not the page it …

PostgresPerformanceStorageInternals

Read more →

How PostgreSQL Hashes Lookups

Aug 19, 2026 54 min read Jay Hubbert

Every hash table in PostgreSQL is one of two things, and the difference between them explains a surprising amount of PostgreSQL’s behaviour. One is dynahash: a chained hash table …

PostgresPerformanceInternalsStorage

Read more →

How PostgreSQL Defers and Speeds Up Tuple Deformation

Jul 28, 2026 36 min read Jay Hubbert

A heap tuple is a packed byte string with no field boundaries in it. Column 3 might be at byte 27, column 4 at byte 31, column 5 — if it is a text — at byte 35. Getting to column …

PostgresPerformanceStorageInternals

Read more →

© 2026 Jay Hubbert · Built with Hugo 0.168.0

RSS ·