Skip to content
Opensource internals
  • Posts

Posts

All posts published on this site.

Everything published here, newest first.

PostgreSQL's bytea Implementation in C: The Blob with a Settings Knob

Sep 5, 2026 8 min read Jay Hubbert

bytea’s output format is a session setting, not a property of the type: flip bytea_output and the same stored bytes print as hex or as escapes, with nothing in the table changing.

PostgresInternalsBytea

Read more →

tmux Batches Terminal Output: One Write() Per Event Loop Iteration

Sep 5, 2026 10 min read Jay Hubbert

Every byte tmux sends to a terminal goes through one function that appends to a per-client buffer, and that buffer is flushed with a single write() per event loop iteration.

TmuxPerformanceInternalsTty

Read more →

PostgreSQL Computes Page Checksums Fast: Thirty-Two Parallel FNV-1a Hashes

Sep 5, 2026 29 min read Jay Hubbert

The page checksum runs 32 FNV-1a hashes in parallel over a 32-column view of the page to hide multiply latency — and 32 is baked into the on-disk format.

PostgresPerformanceStorageInternals

Read more →

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

Sep 3, 2026 8 min read Jay Hubbert

int2, int4 and int8 are one design in three widths — every operator is overflow-checked, so 2147483647 + 1 raises an error instead of wrapping negative.

PostgresInternalsInt2Int4Int8

Read more →

PostgreSQL Deduplicates B-Tree Entries: Posting Lists and In-Place Splits

Sep 1, 2026 46 min read Jay Hubbert

B-tree leaves store one posting list tuple per distinct key instead of one entry per row, and an over-long list is split in place inside the insert’s critical section.

PostgresPerformanceBtreeIndexInternals

Read more →

← Newer Page 84 of 90 Older →

© 2026 Jay Hubbert · Built with Hugo 0.168.0

RSS ·