Lokesh·May 9WAL Record Layout: Parsing PostgreSQL’s Write-Ahead Log in GoEvery write in PostgreSQL is recorded twice: once in the heap page, once in the WAL. The WAL is the ground truth. If the heap disagrees…
Lokesh·Apr 25B-tree Splits: Recursive Page Splits, Sibling Chains, and Root PromotionPart 6 of the deep-postgres series - rebuilding PostgreSQL internals in Go.
Lokesh·Apr 18MVCC Visibility Rules: Implementing HeapTupleSatisfiesMVCCPostgreSQL’s snapshot isolation is implemented without read locks. Instead, every row version carries the transaction IDs that inserted and…
Lokesh·Apr 11B-tree Index Pages: The nbtree Format in GoPostgreSQL’s default index type is B-tree, implemented in src/backend/access/nbtree/. Every B-tree index page uses the standard 8 KB heap…
Lokesh·Apr 4Building a Buffer Manager: Clock-Sweep Eviction and Pin SemanticsPostgreSQL’s buffer manager (src/backend/storage/buffer/) is the layer between the rest of the system and disk. It maintains a fixed-size…
Lokesh·Mar 28Heap Tuples and MVCC Headers: How PostgreSQL Tracks Transaction VisibilityEvery row stored in a PostgreSQL heap has a 23-byte (padded to 24) header prepended to its attribute data. This header carries the MVCC…
Lokesh·Mar 20PostgreSQL Page Layout: Rebuilding the 8 KB Heap Page in GoEvery table and index in PostgreSQL is stored as a sequence of 8 KB pages on disk. The format is defined in src/include/storage/bufpage.h…
Lokesh·Mar 3The Computational Complexity of Topic Exchanges in RabbitMQ: Benchmarks, Pathologies, and Design…Most performance discussions around RabbitMQ focus on disk throughput, consumer lag, or clustering. Far fewer examine the computational…
Lokesh·Feb 24RabbitMQ Routing Is a Binding Evaluation Engine: A Protocol-Level ExaminationRabbitMQ is typically introduced as a message broker consisting of producers, exchanges, queues, and consumers. In most architectural…