Skip to content
Opensource internals
  • Posts

Internals

PostgreSQL's macaddr and macaddr8 Implementation in C: Six Bytes, Eight Bytes, One Marker

Aug 21, 2026 8 min read Jay Hubbert

macaddr8 accepts six-byte EUI-48 input and rewrites it by inserting FF FE in the middle — the marker that makes conversion back to macaddr reversible.

PostgresInternalsMacaddrMacaddr8

Read more →

PostgreSQL's char and name Implementation in C: A Byte and a 64-Byte Label

Aug 20, 2026 8 min read Jay Hubbert

The type named “char” is one by-value byte; “name” is a fixed 64-byte NUL-padded struct whose size is an ABI constant every extension has to agree on.

PostgresInternalsCharName

Read more →

PostgreSQL Hashes Lookups: Dynahash and Simplehash

Aug 19, 2026 54 min read Jay Hubbert

PostgreSQL has two hash tables: dynahash grows one bucket at a time and never rehashes, while simplehash is a templated open-addressing table that resizes without rehashing a …

PostgresPerformanceInternalsStorage

Read more →

PostgreSQL Uses SIMD to Scan Strings Faster: One Vector Layer, Six Consumers

Aug 14, 2026 45 min read Jay Hubbert

PostgreSQL’s port/simd.h is a portable SSE2/NEON vector layer, and COPY FROM, hex coding, JSON escaping, ASCII validation, linear search and radix-tree lookup all use it to skip …

PostgresPerformanceSimdInternals

Read more →

PostgreSQL's Range Type Implementation in C: Bounds Inline, Flags Last

Aug 13, 2026 10 min read Jay Hubbert

A range is a varlena: length, its own type OID, two inline bounds, and a flags byte at the very end — with discrete types rewriting exclusive bounds on the way in.

PostgresInternalsRangeInt4rangeDaterange

Read more →

← Newer Page 5 of 7 Older →

© 2026 Jay Hubbert · Built with Hugo 0.168.0

RSS ·