perf(PROJ-75): Partial Index gegen Seq-Scan in GetUnindexedMails

Der index-pending-Cron (PROJ-58) scannte bei jedem Lauf die komplette
emails-Tabelle, weil indexed_at unindiziert war — skaliert linear mit
Archivgröße. Partial Index auf (received_at DESC) WHERE indexed_at IS NULL
verifiziert auf 192.168.1.132: Seq Scan (13.3ms, 52895 Zeilen) → Index Scan
(0.086ms).

Restlicher PROJ-75-Audit (pgxpool-Tuning, reconciliation N+1) bewusst
zurückgestellt, siehe Feature-Spec.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019j28kGcaJAhBnrYX34hGdt
This commit is contained in:
sysops
2026-08-05 14:55:13 +02:00
co-authored by Claude Sonnet 5
parent 075afa005a
commit c75352839c
4 changed files with 217 additions and 1 deletions
@@ -145,6 +145,8 @@ Zwei zusätzliche Fixes waren nötig, über die ursprüngliche Analyse hinaus:
Auth-Contract-Drift, unabhängig von PROJ-73/74. Test liest den Token
jetzt aus `w.Result().Cookies()`.
Deployed auf 132 am 2026-08-05.
## Acceptance Criteria
- [x] `CGO_ENABLED=0 go build ./...` auf 132 fehlerfrei (alle Pakete