All posts
PostgreSQL in Practice #7 Partitioning: Splitting Giant Tables by Time
Declarative partitioning, the standard prescription for tables in the hundreds of millions of rows. What partitioning actually solves (deleting old data becomes a single DROP, partition pruning, spreading the VACUUM burden) and what it does not, the RANGE syntax for monthly tables, the constraint that the partition key must be part of the primary key, what query conditions enable pruning, the operational duty of creating future partitions and pg_partman, and the criteria for when to adopt it.
Rust in Practice #7 Release Optimization and Cross-Compilation: Small, Fast Binaries That Run Anywhere
The first half of shipping. Tightening [profile.release] (lto, codegen-units, strip) and what each option trades away, why panic = "abort" should not be flipped casually, how binary size shrinks, and cross-compilation with rustup target — especially the musl static-link build that removes the glibc dependency and runs on old servers, plus the cross tool that detours linker problems through Docker.
SRE in Practice #5 Postmortems: Blameless Reviews and Keeping Action Items Alive
Turning incidents into organizational learning: why blamelessness is an information-gathering strategy rather than kindness, trigger criteria for which incidents get a postmortem, the template running from timeline through impact and root-cause analysis to action items, the questioning method that refuses to stop at human error and digs down to system causes, and the tracking rules that keep action items from rotting in the backlog.
Terraform Basics #8 Module Basics: Reusing Resource Bundles and Registry Modules
Starting from the fact that every Terraform directory is already a module, we build a child module that takes variables as inputs and outputs as results, and call it with a module block. We also cover pulling battle-tested modules from the registry with version pinning, plus the criteria for splitting modules and where over-splitting begins.
PostgreSQL in Practice #6 Locks and Concurrency: Deadlocks, DDL Locks, SKIP LOCKED
The territory MVCC does not solve: locking. The two layers of row locks (write-vs-write conflicts) and table locks (DDL), tracing lock waits with pg_locks and pg_blocking_pids, the structure that produces deadlocks (cross-order updates) and the prevention rule (always lock in the same order), making read-decide-write safe with SELECT FOR UPDATE, and the standard work-queue pattern FOR UPDATE SKIP LOCKED.
Rust in Practice #6 Testing: From Parser Unit Tests to CLI Integration Tests
Wrapping loglens in a safety net. #[cfg(test)] unit tests living next to the code (the parser's normal, boundary, and failure cases), integration tests in the tests/ directory, CLI tests that run the built binary and verify output and exit codes with assert_cmd and predicates, temporary log files via tempfile, and what it means that cargo test runs tests in parallel.
SRE in Practice #4 On-Call Operations: Rotations, Escalation, Load Management
Designing an on-call system that people can sustain: the minimum headcount that makes a rotation viable and the shift structures, the escalation chain for when the primary responder is stuck, the handoff routine between shifts, why pages-per-shift needs a measured ceiling, securing follow-up time to pay down what on-call uncovers, and the compensation and culture without which none of it lasts.
Terraform Basics #7 Resource Lifecycle Control: Replacement Conditions, create_before_destroy, prevent_destroy
How to read from a plan which attribute changes end as an update and which ones force a resource replacement. We cover create_before_destroy, which flips the replacement order to reduce downtime, prevent_destroy, which blocks deletion of production resources, ignore_changes, which tolerates changes made outside the code, and forcing a replacement with the -replace flag.
PostgreSQL in Practice #5 VACUUM and autovacuum: How Dead-Tuple Cleanup Works, and Tuning It
VACUUM sits at the center of PostgreSQL operational knowledge. The dead tuples MVCC leaves behind and VACUUM's three jobs (marking space reusable, refreshing the visibility map, preventing transaction ID wraparound), why autovacuum is usually enough and where its default thresholds fail (bigger tables get cleaned later), per-table scale factor tuning, the long-running transactions that block cleanup, bloat inspection queries, and why VACUUM FULL is dangerous.
Rust in Practice #5 Parallelism with rayon: Map-Reduce Without Data Races
Spreading the aggregation across cores. When parallelism pays off (CPU-bound work) and why the strategy switches from streaming to whole-file reads, per-thread partial aggregates with rayon's par_lines plus fold and reduce, why sharing one HashMap behind a Mutex gets slower (lock contention), and the moment the compiler catches a shared-mutable-state mistake.
SRE in Practice #3 Alert Design: Symptom-Based Alerting and Multiwindow Burn Rates
Designing alerting so that only pages worth waking a human survive: why to move from cause-based alerts (high CPU) to symptom-based alerts (user requests failing), the criterion that separates pages from tickets, building burn-rate alerts as combinations of short and long windows to cut both false positives and false negatives, and the operating routine that measures and reduces alert fatigue.
Terraform Basics #6 Dependencies and Repetition: depends_on, count vs for_each, and dynamic Blocks
How references double as dependencies that decide creation order, and the exceptional cases where depends_on is needed. We cover the notorious recreation trap that removing an item from the middle of a list triggers with count, the key-based safety of for_each and how to choose between the two, and dynamic blocks for repeating nested blocks.