Hard local maintenance: VACUUM + WAL checkpoint on every retention/forget execute

This commit is contained in:
retoor
2026-10-10 04:03:51 +02:00
parent abb327f6f9
commit 5309e2bbb5
7 changed files with 40 additions and 7 deletions
+3 -1
View File
@@ -328,7 +328,9 @@ When the remote is unreachable, the service keeps working from the spool and cat
- **Retention** (`POST /api/v1/admin/retention/run`, dry run by default): keeps every
version younger than `retention.keep_days` (default **5**), thins older ones to
one per file per UTC day, and always keeps each file's latest version and all
pins. Follow with GC to reclaim the freed blobs.
pins. Every execute ends with a hard reclaim: `VACUUM` (freelist → 0) plus WAL
checkpoint/truncate, and reports `index_reclaimed` bytes. Follow with GC to
reclaim the freed blobs.
- **Garbage collection** (`POST /api/v1/admin/gc`, dry run by default): deletes blobs
no version references anymore, from the local spool and (unless `remote: false`)
from WebDAV. Only unreferenced data is ever touched, so a crash can leak garbage