Rust

Database in Rust: Histogram Statistics for Accurate Selectivity Estimation
Mar 8, 2026 Development

Database in Rust: Histogram Statistics for Accurate Selectivity Estimation

Part 8 of the Vaultgres journey: deep dive into histogram statistics. Building equi-depth histograms, handling skewed data, multi-column statistics, and using histograms for accurate selectivity estimation in cost-based optimization.

PostgreSQLRustDatabase Internals
Database in Rust: Cost-Based Query Optimizer with Statistics
Mar 6, 2026 Development

Database in Rust: Cost-Based Query Optimizer with Statistics

Part 7 of the Vaultgres journey: building a cost-based query optimizer. Deep dive into statistics collection, cost models, join ordering with dynamic programming, and index selection.

PostgreSQLRustDatabase Internals
Database in Rust: Comprehensive SQL Parser (DDL, DML, Queries)
Mar 6, 2026 Development

Database in Rust: Comprehensive SQL Parser (DDL, DML, Queries)

Part 6 of the Vaultgres journey: building a SQL parser from scratch. Deep dive into lexing, recursive descent parsing, AST design for DDL/DML/queries, and expression precedence handling.

PostgreSQLRustDatabase Internals
Database in Rust: Wire Protocol and Result Set Serialization
Mar 5, 2026 Development

Database in Rust: Wire Protocol and Result Set Serialization

Part 5 of the Vaultgres journey: implementing the PostgreSQL wire protocol. Deep dive into message framing, startup handshake, extended query protocol, and serializing result sets that psql and drivers can understand.

PostgreSQLRustDatabase Internals
Database in Rust: WAL and Crash Recovery with ARIES
Mar 4, 2026 Development

Database in Rust: WAL and Crash Recovery with ARIES

Part 4 of the Vaultgres journey: implementing Write-Ahead Logging and the ARIES recovery algorithm. Deep dive into durability, checkpoints, and the three-phase recovery that brings your database back from a crash.

PostgreSQLRustDatabase Internals
Database in Rust: MVCC and Transaction Management
Mar 3, 2026 Development

Database in Rust: MVCC and Transaction Management

Part 3 of the Vaultgres journey: implementing MVCC for non-blocking reads and snapshot isolation. Deep dive into transaction IDs, visibility rules, vacuum, and the horror of transaction ID wraparound.

PostgreSQLRustDatabase Internals
Database in Rust: B+Tree Indexes with Concurrent Access
Mar 2, 2026 Development

Database in Rust: B+Tree Indexes with Concurrent Access

Part 2 of the Vaultgres journey: implementing B+Tree indexes that power fast lookups. Deep dive into tree structure, page splits, and the nightmare of concurrent access with lock coupling and safe traversal.

PostgreSQLRustDatabase Internals
Building a PostgreSQL-Compatible Database in Rust: Page-Based Storage and Buffer Pool
Mar 1, 2026 Development

Building a PostgreSQL-Compatible Database in Rust: Page-Based Storage and Buffer Pool

Why I'm building Vaultgres—a PostgreSQL-compatible database in Rust—to explore database internals beyond CRUD apps. Deep dive into page-based storage, buffer pool management, and the challenges of implementing WAL-compatible storage with AI-assisted development.

PostgreSQLRustDatabase Internals