03164ee7bce36946eaa521f6db2be1b30bead577.diff
text/x-patch
Filename: 03164ee7bce36946eaa521f6db2be1b30bead577.diff
Type: text/x-patch
Part: 0
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: unified
| File | + | − |
|---|---|---|
| src/backend/access/heap/vacuumlazy.c | 3 | 5 |
diff --git a/src/backend/access/heap/vacuumlazy.c b/src/backend/access/heap/vacuumlazy.c index 159b822740ab32989d8e5d4da71a61c3450ec0f3..d8211470fc34cac00b3da2d8c1bd786ba9ed1e08 100644 --- a/src/backend/access/heap/vacuumlazy.c +++ b/src/backend/access/heap/vacuumlazy.c @@ -67,8 +67,8 @@ * REL_TRUNCATE_MINIMUM or (relsize / REL_TRUNCATE_FRACTION) (whichever * is less) potentially-freeable pages. */ -#define REL_TRUNCATE_MINIMUM 1000 -#define REL_TRUNCATE_FRACTION 16 +#define REL_TRUNCATE_MINIMUM 2 +#define REL_TRUNCATE_FRACTION 32 /* * Timing parameters for truncate locking heuristics. @@ -3089,9 +3089,7 @@ should_attempt_truncation(LVRelState *vacrel) return false; possibly_freeable = vacrel->rel_pages - vacrel->nonempty_pages; - if (possibly_freeable > 0 && - (possibly_freeable >= REL_TRUNCATE_MINIMUM || - possibly_freeable >= vacrel->rel_pages / REL_TRUNCATE_FRACTION)) + if (possibly_freeable >= vacrel->rel_pages / REL_TRUNCATE_FRACTION + REL_TRUNCATE_MINIMUM) return true; return false;