pgdb: drop the fts_data GIN index for messages with no full-text field #151
All Vouch review confidence checks passed
Residual risk 0.23 = Change Risk (0.54) × (1 − Review Confidence (0.58)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.54 · 339 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 10%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.349
Shallow Review Depth
shallow_review_depth
0.289
No Reviewer Assigned
no_reviewer_assigned
0.120
Real PR Conversation Timeline
1 comments
"Review active on #151"
general
weight: 0.35
tthayer
Stacked on #149.
Summary
Follow-up to the stop-creating change: for messages with no direct full-text field, emit the
fts_dataBTREE_GIN index asIsDropped: trueinstead of omitting it. The schema migration path then issuesDROP INDEX IF EXISTS … CONCURRENTLYto remove the existing (always-NULL, never-matching) index on already-provisioned tables — and still never creates it for new tables.This is the deliberate "purge existing" step: the earlier change stops creating the dead index (no impact on existing tables); this one drops the ones already there.
Change
internal/pgdb/pgdb_index.go: always emit the fts_data index; setIsDropped: truewhen the message has no full-text field.Newspaperand thecity.*messages now emit the index as dropped;Pet/ScalarValue/Bookkeep it.Newspaper, present-and-not-dropped forPet.Rollout note
A consumer regenerating against this emits
DROP INDEX … CONCURRENTLYfor every affected model on the next schema apply — sequence mindful of write load on large tables.Verification
go build ./...passes;make exampleregenerates cleanly.fts_test.gofailures in a bare checkout are unrelated (require a local PostgreSQL binary).