Infrastructure

PostgreSQL in Practice #7 Partitioning: Splitting Giant Tables by Time
4 min read

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.

SRE in Practice #5 Postmortems: Blameless Reviews and Keeping Action Items Alive
5 min read

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
5 min read

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
4 min read

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.

SRE in Practice #4 On-Call Operations: Rotations, Escalation, Load Management
5 min read

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
5 min read

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
4 min read

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.

SRE in Practice #3 Alert Design: Symptom-Based Alerting and Multiwindow Burn Rates
4 min read

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
5 min read

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.

PostgreSQL in Practice #4 Advanced Index Strategy: Partial, Composite, Covering — and GIN, BRIN
4 min read

PostgreSQL in Practice #4 Advanced Index Strategy: Partial, Composite, Covering — and GIN, BRIN

Building strategy on top of basics chapter 4's B-tree fundamentals: partial indexes that bake a WHERE condition into the index, covering indexes (INCLUDE) and the conditions for an Index Only Scan, choosing beyond B-tree (GIN, GiST, BRIN), finding unused indexes with pg_stat_user_indexes and cleaning them up, and index bloat with REINDEX CONCURRENTLY.

SRE in Practice #2 Operating the Error Budget: The Policy Document and Burn Rates
5 min read

SRE in Practice #2 Operating the Error Budget: The Policy Document and Burn Rates

Turning the error budget from a concept into an operating tool: the error budget policy document that agrees on actions before the incident, the executive sign-off that makes feature freezes actually work, calculating the burn rate that expresses how fast the budget is being consumed, responding differently to fast burns and slow burns, and the practical patterns that wire the budget into release decisions.

Terraform Basics #5 State Explained: The tfstate File Structure and How plan Computes Changes
5 min read

Terraform Basics #5 State Explained: The tfstate File Structure and How plan Computes Changes

Opening the terraform.tfstate file to examine its structure, and explaining how plan computes changes by comparing three things: code, state, and the real infrastructure. We also cover the problem of sensitive values stored in plaintext and the rule against committing state, manipulation commands like state list, show, mv, and rm, and what happens when you lose your state.