Skip to content
Opensource internals
  • Posts

Postgres

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 →

PostgreSQL's Integer Type Implementation in C (int2, int4, int8)

Sep 3, 2026 7 min read Jay Hubbert

PostgreSQL has three signed integer widths: int2 (2 bytes), int4 (4 bytes), and int8 (8 bytes). They are not three separate designs. They are one design instantiated three times: a …

PostgresInternalsInt2Int4Int8

Read more →

PostgreSQL Deduplicates B-Tree Entries

Sep 1, 2026 46 min read Jay Hubbert

Every index is a lie about multiplicity. A CREATE INDEX on a boolean column produces a structure in which, logically, there are only two distinct keys — but the index has to be …

PostgresPerformanceBtreeIndexInternals

Read more →

PostgreSQL's Multirange Type Implementation in C

Aug 31, 2026 6 min read Jay Hubbert

A multirange is what you get when you let a range type hold more than one range: int4multirange can be {[1,5),[10,20)}. The surprising thing is how little C there is to it. All six …

PostgresInternalsMultirangeRange

Read more →

PostgreSQL Does Async I/O with io_uring

Aug 27, 2026 32 min read Jay Hubbert

Every storage engine eventually runs into the same wall. You ask for a block, the block is not in memory, and the process blocks in the kernel until the disk spins around. It …

PostgresPerformanceIoInternals

Read more →

← Newer Page 4 of 7 Older →

© 2026 Jay Hubbert · Built with Hugo 0.168.0

RSS ·