summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMelanie Plageman2025-12-10 16:10:01 +0000
committerMelanie Plageman2025-12-10 16:10:01 +0000
commitbd298f54a0d60a0376959e10074aa07cbad267f2 (patch)
treea5277ce81755809e55aadd37b20dcb94264c5c80 /src
parent70b4d9043931a5c4cdbf7bb08b7e3cb6e8beee1b (diff)
Simplify vacuum visibility assertion
Phase I vacuum gives the page a once-over after pruning and freezing to check that the values of all_visible and all_frozen agree with the result of heap_page_is_all_visible(). This is meant to keep the logic in phase I for determining visibility in sync with the logic in phase III. Rewrite the assertion to avoid an Assert(false). Suggested by Andres Freund. Author: Melanie Plageman <melanieplageman@gmail.com> Discussion: https://postgr.es/m/mhf4vkmh3j57zx7vuxp4jagtdzwhu3573pgfpmnjwqa6i6yj5y%40sy4ymcdtdklo
Diffstat (limited to 'src')
-rw-r--r--src/backend/access/heap/vacuumlazy.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/backend/access/heap/vacuumlazy.c b/src/backend/access/heap/vacuumlazy.c
index eff7c39da7f..e8c99c3773d 100644
--- a/src/backend/access/heap/vacuumlazy.c
+++ b/src/backend/access/heap/vacuumlazy.c
@@ -2042,10 +2042,9 @@ lazy_scan_prune(LVRelState *vacrel,
Assert(presult.lpdead_items == 0);
- if (!heap_page_is_all_visible(vacrel->rel, buf,
- vacrel->cutoffs.OldestXmin, &debug_all_frozen,
- &debug_cutoff, &vacrel->offnum))
- Assert(false);
+ Assert(heap_page_is_all_visible(vacrel->rel, buf,
+ vacrel->cutoffs.OldestXmin, &debug_all_frozen,
+ &debug_cutoff, &vacrel->offnum));
Assert(presult.all_frozen == debug_all_frozen);