diff options
author | Robert Haas | 2024-01-18 15:03:42 +0000 |
---|---|---|
committer | Robert Haas | 2024-01-18 15:03:42 +0000 |
commit | c120550edb86b8e0d785063501c259e29aa80eb6 (patch) | |
tree | c896cb8580438bd5ecf5e845ecd6def422f782d2 /src/include/access/heapam.h | |
parent | 7b1dbf0a8d1d4e1e6d01a76dc45a3216e8a16d94 (diff) |
Optimize vacuuming of relations with no indexes.
If there are no indexes on a relation, items can be marked LP_UNUSED
instead of LP_DEAD when pruning. This significantly reduces WAL
volume, since we no longer need to emit one WAL record for pruning
and a second to change the LP_DEAD line pointers thus created to
LP_UNUSED.
Melanie Plageman, reviewed by Andres Freund, Peter Geoghegan, and me
Discussion: https://postgr.es/m/CAAKRu_bgvb_k0gKOXWzNKWHt560R0smrGe3E8zewKPs8fiMKkw%40mail.gmail.com
Diffstat (limited to 'src/include/access/heapam.h')
-rw-r--r-- | src/include/access/heapam.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/include/access/heapam.h b/src/include/access/heapam.h index 932ec0d6f2b..4b133f68593 100644 --- a/src/include/access/heapam.h +++ b/src/include/access/heapam.h @@ -320,6 +320,7 @@ struct GlobalVisState; extern void heap_page_prune_opt(Relation relation, Buffer buffer); extern void heap_page_prune(Relation relation, Buffer buffer, struct GlobalVisState *vistest, + bool mark_unused_now, PruneResult *presult, OffsetNumber *off_loc); extern void heap_page_prune_execute(Buffer buffer, |