Commit de837d9
authored
fix(db): earlier autovacuum on snapshots (#3368)
Applies the same per-table autovacuum override `env_builds` already
received (20260723030000) to `public.snapshots`.
**Why this is correct:** the change is a storage-parameter update only —
it alters when autovacuum schedules a pass, never what any query reads
or writes. It takes a brief ShareUpdateExclusive lock (no rewrite, no
downtime) and is trivially revertible with `RESET`.
**What it improves:** the default trigger fires only after dead tuples
reach a fixed fraction of the table, and on a large table that means
cleanup starts far too late — meanwhile every read of this table pays
visibility checks against the accumulated dead row versions, so scan and
lookup costs creep up between passes. This table sits on hot read paths
(snapshot lookups during sandbox lifecycle operations), so keeping its
dead-tuple population small keeps those paths at their baseline cost.
Triggering earlier also makes each pass smaller and cheaper — frequent
small vacuums instead of rare huge ones.1 parent 2a8112a commit de837d9
1 file changed
Lines changed: 22 additions & 0 deletions
Lines changed: 22 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
0 commit comments