Skip to content
Opensource internals
  • Posts

Posts

All posts published on this site.

Everything published here, newest first.

PostgreSQL's json and jsonb Implementation in C: Text Versus Tree

Jul 28, 2026 9 min read Jay Hubbert

json keeps your exact bytes; jsonb re-serializes into a tree of 4-byte JEntry headers whose 28-bit field holds either a length or an offset.

PostgresInternalsJSONJsonb

Read more →

PostgreSQL Defers and Speeds Up Tuple Deformation: Cached Offsets in TupleDesc

Jul 28, 2026 36 min read Jay Hubbert

TupleDesc now caches the byte offset of every fixed-width attribute, so fetching column 40 of a wide table can cost one addition instead of a full re-walk.

PostgresPerformanceStorageInternals

Read more →

tmux Format Expansion Runs Shell Commands: A Template Language With a Footgun

Jul 27, 2026 7 min read Jay Hubbert

tmux formats are code, and they execute where they’re expanded.

TmuxSecurityInternalsFormats

Read more →

PostgreSQL's date Implementation in C: Days Since 2000, Stored as an int32

Jul 27, 2026 6 min read Jay Hubbert

A date is an int32 count of days since 2000-01-01 — which is why ordering is free, why ‘infinity’ is literally INT32_MAX, and why the calendar costs you nothing at query time.

PostgresInternalsDate

Read more →

PostgreSQL Sorts Rows Fast: Abbreviated Keys, Radix Sort, and Top-N Heaps

Jul 25, 2026 45 min read Jay Hubbert

PostgreSQL’s sorter attacks three problems at once: abbreviated keys make string comparisons into integer compares, a radix sort handles integer keys, and a bounded heap makes …

PostgresPerformanceSortInternals

Read more →

← Newer Page 88 of 90 Older →

© 2026 Jay Hubbert · Built with Hugo 0.168.0

RSS ·