Skip to content
Opensource internals
  • Posts

Postgres

PostgreSQL Allocates Memory Fast

Sep 19, 2026 40 min read Jay Hubbert

Every C program that wants to be fast needs to be fast at allocating memory. PostgreSQL allocates memory in the tightest loop imaginable: a hash join probes its hash table once per …

PostgresPerformanceMemoryInternals

Read more →

PostgreSQL Groups Commits

Sep 12, 2026 50 min read Jay Hubbert

Every database has a moment where a transaction becomes durable, and every database has to decide what that moment costs. PostgreSQL’s answer is unusual: committing a transaction …

PostgresPerformanceWalInternals

Read more →

PostgreSQL's bit and varbit Implementation in C

Sep 8, 2026 9 min read Jay Hubbert

In SQL, bit(4) and bit varying(4) look like different animals: one has a fixed width, the other does not. In PostgreSQL they are the same type underneath. The same struct, the same …

PostgresInternalsBitVarbit

Read more →

PostgreSQL's interval Implementation in C

Sep 7, 2026 10 min read Jay Hubbert

An interval looks like a duration, but PostgreSQL does not store it as one number. It stores three: a month count, a day count, and a microsecond count, packed into a 16-byte …

PostgresInternalsInterval

Read more →

PostgreSQL's bytea Implementation in C

Sep 5, 2026 7 min read Jay Hubbert

bytea is the one string type in PostgreSQL that is genuinely binary. It has no encoding, no collation, no length limit in the SQL sense, and no blank-padding semantics. That makes …

PostgresInternalsBytea

Read more →

← Newer Page 3 of 7 Older →

© 2026 Jay Hubbert · Built with Hugo 0.168.0

RSS ·