ENGINEERING NOTES

Production incidents, architecture decisions, and things worth documenting.

Long-form investigations from database reliability, platform engineering and production operations. Written when there is something worth documenting — not on a schedule.

19 PUBLISHED

AUTOMATION · SQL SERVER · MARIADB · POSTGRESQL · SCYLLADB · 12 MIN READ

The Model Proposes, the Human Disposes, the Platform Verifies

An LLM suggests fixes from a database capture; the portal checks, a human runs and a fresh capture verifies each one.

AUTOMATIONLLMCONTROL-PLANEGUARDRAILSVERIFICATIONPLATFORM-ENGINEERING

READ NOTE →

OBSERVABILITY · SQL SERVER · POSTGRESQL · 8 MIN READ

A Finding Needs an Identity Before It Can Have a History

How a findings tracker stopped rediscovering the same breaches: a key per finding, and resolution only on evidence.

OBSERVABILITYPROMETHEUSDATA-MODELLINGPLATFORM-ENGINEERINGMCP

READ NOTE →

ARCHITECTURE · POSTGRESQL · 16 MIN READ

Inspect and Change Are Different Verbs

How a database operations portal changes production: one executor, lock keys, heartbeats, stops and no retries.

CONTROL-PLANEJOB-QUEUEDISTRIBUTED-SYSTEMSPLATFORM-ENGINEERINGSAFETY

READ NOTE →

PRODUCTION FORENSICS · MARIADB · 9 MIN READ

The Backup's GTID Was Not the Master's Position

A MariaDB DR rebuild that restored cleanly, then failed with error 1236: the GTID a backup records is not where to start.

REPLICATIONGTIDDISASTER-RECOVERYMARIABACKUPAUTOMATION

READ NOTE →

ARCHITECTURE · POSTGRESQL · 10 MIN READ

Row-Level Security as the Second Lock, and the Grants I Kept Out of It

PostgreSQL RLS in two multi-tenant apps: forced policies, transaction-local context, and sharing kept out of policies.

ROW-LEVEL-SECURITYMULTI-TENANCYSECURITYSCHEMA-DESIGN

READ NOTE →

PRODUCTION FORENSICS · SQL SERVER · 9 MIN READ

The Database Moved Hosts. Its Service Master Key Couldn't Follow.

On RDS Custom for SQL Server, a host replacement can leave the Service Master Key undecryptable, and backups fail next.

AWSRDS-CUSTOMENCRYPTIONBACKUPPATCHING

READ NOTE →

PERFORMANCE · SQL SERVER · 8 MIN READ

A CTE Is Not a Temp Table

A SQL Server search procedure ran its full-text search four times per call, because every CTE reference is re-evaluated.

PERFORMANCEQUERY-TUNINGCTEFULL-TEXT-SEARCHDYNAMIC-SQL

READ NOTE →

PERFORMANCE · SQL SERVER · 8 MIN READ

CPU Fell 67%. Reads Went Up 44%. Both Were True.

Replacing per-row scalar UDFs with inline TVFs in SQL Server, and the per-row spools that quietly added the reads back.

PERFORMANCEQUERY-TUNINGSCALAR-UDFEXTENDED-EVENTSMEASUREMENT

READ NOTE →

PERFORMANCE · BABELFISH · POSTGRESQL · 5 MIN READ

Tuning Babelfish When the Client Speaks T-SQL but the Planner Is PostgreSQL

A practical workflow for getting execution plans, runtime evidence and session-level tuning data from Babelfish.

SQL-SERVERPERFORMANCEQUERY-TUNING

READ NOTE →

AUTOMATION · SQL SERVER · 4 MIN READ

Archiving a Hot Audit Table Without Making the Archive the Outage

Batched SQL Server archiving with bounded transactions, referential safety, restartability and throttling.

ARCHIVINGBATCHINGTRANSACTIONSRELIABILITY

READ NOTE →

ARCHITECTURE · SQL SERVER · POSTGRESQL · MARIADB · SCYLLADB · WSFC · UPDATED · 25 MIN READ

From Daily Checks to a Database Engineering Command Center

How daily DBA checks became a distributed multi-engine operations platform — and then an audited control plane for the estate.

DISTRIBUTED-SYSTEMSOBSERVABILITYPLATFORM-ENGINEERINGAUTOMATIONCONTROL-PLANEAI-ASSISTED-DEVELOPMENTLLM

READ NOTE →

PRODUCTION FORENSICS · POSTGRESQL · 5 MIN READ

A 99.99% Cache Hit Ratio Didn't Answer the PostgreSQL Memory Question

Why a 99.99% PostgreSQL cache hit ratio did not explain connection-driven memory pressure.

MEMORYAMAZON-RDSPERFORMANCECAPACITY-PLANNING

READ NOTE →

OBSERVABILITY · MARIADB · 3 MIN READ

The Label Changed. The Prometheus Series Didn't Disappear.

A mutable label created a stale in-process metric series that made a database-health aggregate look healthy.

PROMETHEUSOBSERVABILITYPYTHONMETRICS

READ NOTE →

AUTOMATION · SQL SERVER · UPDATED · 5 MIN READ

The Plan Got Worse. Query Store Had the Previous One.

Using Query Store and FORCE_LAST_GOOD_PLAN to turn SQL Server plan regressions into a bounded self-healing loop.

QUERY-STOREAUTOMATIC-TUNINGPERFORMANCEAUTOMATION

READ NOTE →

AUTOMATION · SQL SERVER · UPDATED · 11 MIN READ

Making SQL Server Memory Follow the Failover

Recalculating SQL Server max memory from the FCI instances actually running on each cluster node.

FAILOVER-CLUSTERMEMORYPOWERSHELLAUTOMATION

READ NOTE →

PRODUCTION FORENSICS · SQL SERVER · 4 MIN READ

The SQL Server Was Up. Kerberos Was Pointing at the Wrong Account.

Diagnosing Cannot generate SSPI context when SQL Server worked by IP but failed by hostname.

KERBEROSACTIVE-DIRECTORYWINDOWS-AUTHENTICATIONPRODUCTION

READ NOTE →

PRODUCTION FORENSICS · MYSQL · 7 MIN READ

The 20 GB MySQL Had Already Freed

Tracing unexplained MySQL RSS through Performance Schema, Linux process memory and the allocator.

LINUXMEMORYALLOCATORPRODUCTION

READ NOTE →

AUTOMATION · SQL SERVER ARCHIVE · · UPDATED · 9 MIN READ

The Database Failed Over. Its CDC Jobs Didn't.

Availability Groups move databases, not Agent jobs — so CDC capture stops at every failover. A watchdog that notices.

AVAILABILITY-GROUPSCDCFAILOVERAUTOMATION

READ NOTE →

AUTOMATION · SQL SERVER ARCHIVE · · UPDATED · 12 MIN READ

The Lookups I Stopped Skipping

Eight SSMS query shortcuts behind one stored procedure, and the parser constraint that shaped the whole interface.

SSMSTOOLINGT-SQLPRODUCTIVITY

READ NOTE →