Обсуждение: pgsql: Add pruning fast path for all-visible and all-frozen pages

Поиск
Список
Период
Сортировка

pgsql: Add pruning fast path for all-visible and all-frozen pages

От
Melanie Plageman
Дата:
Add pruning fast path for all-visible and all-frozen pages

Because of the SKIP_PAGES_THRESHOLD optimization or a stale prune XID,
heap_page_prune_and_freeze() can be invoked for pages with no pruning or
freezing work to do. To avoid this, if a page is already all-frozen or
it is all-visible and no freezing will be attempted, exit early. We
can't exit early if vacuum passed DISABLE_PAGE_SKIPPING, though.

Author: Melanie Plageman <melanieplageman@gmail.com>
Reviewed-by: Andres Freund <andres@anarazel.de>
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Reviewed-by: Kirill Reshke <reshkekirill@gmail.com>
Discussion: https://postgr.es/m/bqc4kh5midfn44gnjiqez3bjqv4zogydguvdn446riw45jcf3y%404ez66il7ebvk

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/01b7e4a46d0fa8478c1142f65ee441fb0c32cca1

Modified Files
--------------
src/backend/access/heap/pruneheap.c  | 87 +++++++++++++++++++++++++++++++++++-
src/backend/access/heap/vacuumlazy.c | 10 +++++
src/include/access/heapam.h          |  1 +
3 files changed, 97 insertions(+), 1 deletion(-)