db_compact
Shrink oversized database files by running VACUUM and rebuilding the FTS index to reclaim space. Schedule during low activity to avoid exclusive lock and stale search results.
Instructions
Shrink the DB file: VACUUM + mandatory dialog_fts rebuild.
Run in a quiet window — VACUUM needs an exclusive lock and copies the whole file (minutes on a multi-GB DB); concurrent FTS searches during the vacuum→rebuild gap may map to wrong rows until the rebuild commits. Fails soft (with a retry hint) when the DB is busy.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |