mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 12:32:43 +00:00
`updated_at` sits in the sync-feed index, so every update that moved it wrote a new row version on another page and an entry in every index. Provider re-syncs rewrite many unchanged rows, which grew the table to several times its live size and sent each unchanged row down the sync feed again. Migration 0412 adds a row trigger that keeps `updated_at` and `sync_version` when an update changes nothing else, so such an update is heap-only and the feed stays silent; it sets `fillfactor = 85` and a 5 % autovacuum threshold. The maintenance queue gains a nightly check that vacuums when dead rows pass a tenth of the live ones and warns when the heap is more than three times what its live rows need, which only a `VACUUM FULL` in a window gives back. The admin card keeps showing the operator's runs only.