databases
19 minDatabase Internals Advanced: MVCC Anomalies, Cost Models, Sharding, and Storage Engines
Reason about isolation anomalies, query-plan mistakes, B-tree/LSM trade-offs, shard routing, and production-safe index changes.
Loading page...
databases
19 minReason about isolation anomalies, query-plan mistakes, B-tree/LSM trade-offs, shard routing, and production-safe index changes.
Q&A
Q&AAn old transaction snapshot may still need row versions that newer transactions have replaced.
PostgreSQL MVCC keeps row versions visible to active snapshots. A long-running transaction can hold an old snapshot open, so vacuum cannot yet remove some dead versions. Bound transaction lifetimes and investigate idle-in-transaction sessions when table bloat grows.
devops
10 minMulti-stage builds keep the runtime image lean while preserving a fast developer loop. Learn how to separate build dependencies from runtime dependencies without losing traceability or reproducibility.
Q&A
Q&AAssociativity and an identity element make regrouping partial results meaningful.
A parallel reduction may group values differently, so its combine operation should be associative for equivalent results and have a suitable identity value. Floating-point addition can vary slightly with grouping. Avoid reducers with hidden side effects because execution order may not be stable.