Skip to content

Investigate 16 GB database growth and define retention policy #590

Description

@EtanHey

Incident evidence

Read-only profiling during the 2026-07-13 Tier-0 incident found:

  • Canonical DB allocation: 17,415,675,904 bytes
  • page_size=4096, page_count=4,251,874, freelist_count=322,892
  • Reclaimable freelist is about 1.32 GB, so free pages alone do not explain the 16 GB allocation
  • Exact dbstat sizes included:
    • chunks: 2.33 GB
    • float vector chunks: 2.85 GB
    • binary vectors: 86.7 MB
    • primary FTS data: 2.38 GB
  • Profiling chunks_fts_trigram_data exceeded a 30-second read-only deadline, making trigram/FTS growth a leading area to measure safely

Follow-up

  • Build a bounded, read-only size attribution report for all large tables and indexes, including trigram FTS
  • Identify the ingestion/retention mechanisms driving growth
  • Propose retention/archive policy and capacity alerts
  • Quantify what VACUUM could reclaim before considering it

Safety

Do not VACUUM, delete rows, change schema, or otherwise mutate the canonical DB as part of diagnosis. Any maintenance operation needs a separately reviewed runbook with backup, downtime, and rollback gates.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions