Re: eliminate xl_heap_visible to reduce WAL (and eventually set VM on-access)

From: Melanie Plageman <melanieplageman(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Kirill Reshke <reshkekirill(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Andrey Borodin <x4mmm(at)yandex-team(dot)ru>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
Subject: Re: eliminate xl_heap_visible to reduce WAL (and eventually set VM on-access)
Date: 2025-12-16 16:58:50
Message-ID: CAAKRu_ayWLg=WDGZZfSPWf0KjPM8u=LBb0D6XaEWyx2_YFFwAQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Dec 3, 2025 at 6:07 PM Melanie Plageman
<melanieplageman(at)gmail(dot)com> wrote:
>
> If we're just talking about the renaming, looking at procarray.c, it
> is full of the word "removable" because its functions were largely
> used to examine and determine if everyone can see an xmax as committed
> and thus if that tuple is removable from their perspective. But
> nothing about the code that I can see means it has to be an xmax. We
> could just as well use the functions to determine if everyone can see
> an xmin as committed.

In the attached v27, I've removed the commit that renamed functions in
procarray.c. I've added a single wrapper GlobalVisTestXidNotRunning()
that is used in my code where I am testing live tuples. I think you'll
find that I've addressed all of your review comments now -- as I've
also gotten rid of the confusing blk_known_av logic through a series
of refactors.

The one outstanding point is which commits should bump
XLOG_PAGE_MAGIC. (also review of the reworked patches).

- Melanie

Attachment Content-Type Size
v27-0001-Combine-visibilitymap_set-cases-in-lazy_scan_pru.patch text/x-patch 9.6 KB
v27-0002-Eliminate-use-of-cached-VM-value-in-lazy_scan_pr.patch text/x-patch 13.3 KB
v27-0003-Refactor-lazy_scan_prune-VM-clear-logic-into-hel.patch text/x-patch 6.5 KB
v27-0004-Set-the-VM-in-heap_page_prune_and_freeze.patch text/x-patch 26.2 KB
v27-0005-Move-VM-assert-into-prune-freeze-code.patch text/x-patch 10.9 KB
v27-0006-Eliminate-XLOG_HEAP2_VISIBLE-from-vacuum-phase-I.patch text/x-patch 14.3 KB
v27-0007-Eliminate-XLOG_HEAP2_VISIBLE-from-empty-page-vac.patch text/x-patch 2.6 KB
v27-0008-Remove-XLOG_HEAP2_VISIBLE-entirely.patch text/x-patch 25.3 KB
v27-0009-Use-GlobalVisState-in-vacuum-to-determine-page-l.patch text/x-patch 11.6 KB
v27-0010-Unset-all_visible-sooner-if-not-freezing.patch text/x-patch 2.5 KB
v27-0011-Track-which-relations-are-modified-by-a-query.patch text/x-patch 2.5 KB
v27-0012-Pass-down-information-on-table-modification-to-s.patch text/x-patch 23.7 KB
v27-0013-Allow-on-access-pruning-to-set-pages-all-visible.patch text/x-patch 11.3 KB
v27-0014-Set-pd_prune_xid-on-insert.patch text/x-patch 6.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Melanie Plageman 2025-12-16 17:16:55 Re: Adding vacuum test case of setting the VM when heap page is unmodified
Previous Message Srinath Reddy Sadipiralla 2025-12-16 16:39:12 Re: Adding vacuum test case of setting the VM when heap page is unmodified