ImGajeed76/pg-xpatch
PostgreSQL Table Access Method for delta-compressed versioned data
What's novel
PostgreSQL Table Access Method for delta-compressed versioned data
Code Analysis
11 files read · 4 roundsA PostgreSQL Table Access Method extension that transparently stores versioned rows as delta-compressed differences between consecutive versions within groups, reconstructing full content on read via a shared-memory LRU cache and parallel scan infrastructure.
Strengths
Genuinely deep C implementation of a full PostgreSQL TAM with lock-striped shared-memory LRU cache, BLAKE3-hashed concurrent hash tables, proper MVCC with cascading-delete edge cases, parallel scan support, and a 30+ file test suite covering crash recovery, deadlocks, race conditions, and type roundtrips. The architecture is clean with clear separation between storage, compression, caching, and TAM interface layers.
Weaknesses
The xpatch_tam.c file at ~100KB is a monolith that could benefit from further decomposition, and the O(n) full-table scan in xpatch_get_max_seq (before cache hit) is a performance concern for large tables with many groups. The project is AGPL-licensed which limits commercial adoption without a separate license.
Score Breakdown
Signal breakdown
Innovation
Craft
Traction
Scope
Evidence
Commits
63
Contributors
1
Files
159
Active weeks
6
Repository
Language
Python
Stars
16
Forks
0
License
AGPL-3.0