Databases

Databases

Postgres internals, isolation levels, replication, pgvector, DuckDB, CDC.

68Articles
68Topics covered
Articles in this category

All 22 articles, sorted alphabetically

Advertisement
ARTICLE · 01

Database Connection Pooling

A deep dive on database connection pooling: why connections are expensive, connection lifecycle and overhead, pooling modes (statement, transaction, s…

Read article →
ARTICLE · 02

Bitmap index architecture

Deep-dive on bitmap indexes: one bitmap per distinct value, boolean AND/OR/NOT and popcount query evaluation, compression with RLE/Roaring, where they…

Read article →
ARTICLE · 03

Bloom filter architecture in LSM engines

Deep-dive on Bloom filters in log-structured merge-tree databases: how a compact bit array and k hash functions answer 'definitely absent' o…

Read article →
ARTICLE · 04

Buffer pool architecture

Deep-dive on database buffer pools: page tables and frames, pin counts and latches, clock sweep and midpoint LRU scan resistance, the WAL-before-data …

Read article →
ARTICLE · 05

CDC via logical decoding

Deep-dive on Change Data Capture via logical decoding: WAL-based change streaming, logical decoding of physical records, replication slots and output …

Read article →
ARTICLE · 06

Connection pooling architecture

Deep-dive on database connection pooling: why connections are expensive, application pools vs proxy poolers, session vs transaction pooling trade-offs…

Read article →
ARTICLE · 07

Database deadlock detection architecture

Deep-dive on deadlock handling in databases: the lock manager and wait-for graph, eager vs lazy cycle detection, victim-selection policies, timeout fa…

Read article →
ARTICLE · 08

GIN inverted index architecture

Deep-dive on the Generalized Inverted Index (GIN): extracting many keys per composite value, mapping each key to a sorted posting list of row ids with…

Read article →
ARTICLE · 09

Group commit architecture

Deep-dive on database group commit: why one fsync per transaction caps throughput at flush latency, how the commit queue and group leader let many com…

Read article →
ARTICLE · 10

Hash join architecture

Deep-dive on the hash join: the algorithm that makes equality joins on large, unindexed relations fast by building a hash table on the smaller input a…

Read article →
ARTICLE · 11

LSM-tree storage engine architecture

Deep-dive on the Log-Structured Merge tree: WAL-plus-MemTable write path, immutable SSTables with bloom filters and block index, L0/L1..Ln level struc…

Read article →
ARTICLE · 12

Materialized views -- precomputed query results

Deep-dive on database materialized views: the expensive-query need, precomputing and storing results, materialized vs regular view (stored vs recomput…

Read article →
ARTICLE · 13

MVCC -- readers and writers that never block each other

Deep-dive on Multi-Version Concurrency Control (MVCC): the reader-writer contention problem, keeping multiple versions, consistent snapshots, no read …

Read article →
ARTICLE · 14

OLTP vs OLAP Database Architectures in Depth

A 2500-word walkthrough of OLTP row stores vs OLAP column stores, CDC/ETL pipelines, lakehouse architectures, and HTAP alternatives.

Read article →
ARTICLE · 15

Database sharding -- horizontal partitioning across nodes

Deep-dive on database sharding: the single-node limit, the critical shard key choice, sharding strategies (hash/range/directory), routing, hot shards …

Read article →
ARTICLE · 16

Transactional Database Architecture in Depth

A 2500-word walkthrough of transactional DB: MVCC, lock manager, WAL/redo, rollback, isolation levels, 2PC, vacuum, recovery.

Read article →
ARTICLE · 17

Two-phase commit architecture

Deep-dive on two-phase commit: the prepare and decide phases, write-ahead logging on coordinator and participants, held locks and the in-doubt window,…

Read article →
ARTICLE · 18

Vacuum and bloat architecture

Deep-dive on Postgres vacuum and bloat: why MVCC updates leave dead tuples, the cluster-wide visibility horizon and the idle transactions, replication…

Read article →
ARTICLE · 19

Vector Database Architecture in Depth

A 2500-word walkthrough of vector database architecture: embedder, HNSW/IVF/DiskANN indexes, metadata filter, hybrid search, quantization, sharding.

Read article →
ARTICLE · 20

Write amplification architecture

Deep-dive on write amplification in LSM storage engines: the WAL/memtable/flush path, leveled vs tiered compaction rewrites, the read/write/space trad…

Read article →
ARTICLE · 21

PostgreSQL Indexes

The four PostgreSQL index types explained: B-tree for range queries and sorting, GIN for inverted indexes and full-text search, GIST for spatial and c…

Read article →
ARTICLE · 22

PostgreSQL Logical Replication + CDC

PostgreSQL logical replication: row-level selective replication across major versions, WAL-based change data capture, replication slots and decoding, …

Read article →