Ops Runbooks
July 10, 2026 · View on GitHub
Audience: on-call / platform
Pins SSOT: edgequake/docker/extension-pins.sh
Related: 10-POSTGRES-PGVECTOR-AGE-PERFORMANCE.md, 09-OPS-RELIABILITY-DEEPSTUDY.md
1. Major version upgrade (PG16 → 17 → 18)
- Build target image:
EQ_POSTGRES_PROFILE=pg17 make postgres-image-build(or pg18). - Snapshot / dump:
pg_dumplogical dump ofedgequakeDB. - Stop writers:
make stop(or drain API). - Start new major container; restore dump; run
make backend-bg(sqlx + reconcile). - Verify
/readyhas emptyblockers; checkmissing_hnsw_indexabsent. - Smoke:
bash specs/046-graphrag-study/e2e/run_ops17_perf_smoke.sh. - AGE note: PG16 uses AGE 1.6; PG17/18 use AGE 1.7 — expect longer
CREATE EXTENSIONon first boot.
Rollback: restore previous image + dump; do not mix AGE majors on same data directory without dump/restore.
2. Suspected index / catalog corruption
Symptoms: query timeouts, ERROR: index ... contains unexpected zero page, ANN returning empty under filter.
- Confirm pgvector version:
SELECT extversion FROM pg_extension WHERE extname = 'vector';(need ≥ 0.8.0 for iterative_scan). - Check HNSW presence: admin
/admin/storage/inspectormissing_ann_index_tableson/ready. - REINDEX (maintenance window):
REINDEX INDEX CONCURRENTLY <hnsw_index_name>; - If AGE graph indexes missing: run support script for M038 /
ensure_indexespath (see migration bootstrap logs). - After repair: restart backend so reconcile re-checks ANN; confirm
/ready200.
3. Storage drift SLO (OPS-19)
Metric: edgequake_storage_drift_critical (gauge), edgequake_storage_drift_violations_total.
| Condition | Action |
|---|---|
edgequake_storage_drift_critical > 0 for 15m | Page: run /admin/storage/inspect, then SAFE /admin/storage/repair |
| Warning-only drift | Ticket within 1 business day; prefer SAFE auto-repair from hourly monitor |
| INV-C entity_count drift > 20% sample | Investigate merge/compensation failures; check quarantine logs |
Hourly monitor already logs CRITICAL and applies SAFE repairs (StorageInspector::spawn_hourly_monitor).
4. Chunk retry after partial extract
GET /api/v1/documents/{id}/failed-chunksPOST /api/v1/documents/{id}/retry-chunks— merges viaKnowledgeGraphMerger(OPS-21).- If KV chunk missing → status
abandoned; re-ingest document.
5. Quick health checklist
curl -s http://localhost:8080/health | jq .
curl -s http://localhost:8080/ready | jq .
curl -s http://localhost:8080/metrics | grep -E 'drift|ann_index|popular_node|sparse_retrieval|faithfulness|graph_quality|query_requests'
ACC / pins (pre-release):
make ops17-smoke
make spec046-acc