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

From: Melanie Plageman <melanieplageman(at)gmail(dot)com>
To: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, 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>
Subject: Re: eliminate xl_heap_visible to reduce WAL (and eventually set VM on-access)
Date: 2025-12-10 23:35:47
Message-ID: CAAKRu_bvQiesumRhgvbcym1T9Z9=ddGfUbi-dSNxLRc6JvL1-w@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Dec 9, 2025 at 12:48 PM Melanie Plageman
<melanieplageman(at)gmail(dot)com> wrote:
>
> In this set 0001 and 0002 are independent. 0003-0007 are all small
> steps toward the single change in 0007 which combines the VM updates
> into the same WAL record as pruning and freezing. 0008 and 0009 are
> removing the rest of XLOG_HEAP2_VISIBLE. 0010 - 0012 are refactoring
> needed to set the VM during on-access pruning. 0013 - 0015 are small
> steps toward setting the VM on-access. And 0016 sets the prune xid on
> insert so we may set the VM on-access for pages that have only new
> data.

I committed 0001 and 0002. attached v25 reflects that.
0001-0004 refactoring steps for eliminate visible record from phase I
(not probably independent commits in the end)
0005 eliminate XLOG_HEAP2_VISIBLE from phase I vac
0006-0007 removing the rest of XLOG_HEAP2_VISIBLE
0008-0010 refactoring for setting VM on-access
0011-0013 setting the VM on-access
0014 - setting pd_prune_xid on insert

- Melanie

Attachment Content-Type Size
v25-0001-Combine-visibilitymap_set-cases-in-lazy_scan_pru.patch application/x-patch 8.7 KB
v25-0002-Refactor-lazy_scan_prune-VM-set-logic-into-helpe.patch application/x-patch 9.4 KB
v25-0003-Set-the-VM-in-heap_page_prune_and_freeze.patch application/x-patch 24.9 KB
v25-0004-Move-VM-assert-into-prune-freeze-code.patch application/x-patch 14.4 KB
v25-0005-Eliminate-XLOG_HEAP2_VISIBLE-from-vacuum-phase-I.patch application/x-patch 13.7 KB
v25-0006-Eliminate-XLOG_HEAP2_VISIBLE-from-empty-page-vac.patch application/x-patch 2.6 KB
v25-0007-Remove-XLOG_HEAP2_VISIBLE-entirely.patch application/x-patch 25.4 KB
v25-0008-Rename-GlobalVisTestIsRemovableXid-to-GlobalVisX.patch application/x-patch 8.1 KB
v25-0009-Use-GlobalVisState-in-vacuum-to-determine-page-l.patch application/x-patch 10.6 KB
v25-0011-Track-which-relations-are-modified-by-a-query.patch application/x-patch 2.5 KB
v25-0012-Pass-down-information-on-table-modification-to-s.patch application/x-patch 23.0 KB
v25-0013-Allow-on-access-pruning-to-set-pages-all-visible.patch application/x-patch 12.9 KB
v25-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 Tom Lane 2025-12-11 00:38:16 Re: INOUT params with expanded objects
Previous Message Chao Li 2025-12-10 23:28:13 Re: Propose: Adding a '--enable-failover' option to 'pg_createsubscriber'