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

From: Melanie Plageman <melanieplageman(at)gmail(dot)com>
To: Kirill Reshke <reshkekirill(at)gmail(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, 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-11-19 23:13:30
Message-ID: CAAKRu_Zha7HcdQBv8tTtQrcry5332J6kHnOc1X=TT03LzUXDow@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Nov 19, 2025 at 4:35 AM Kirill Reshke <reshkekirill(at)gmail(dot)com> wrote:
>
> Hi! I looked up these 0002-0003 patches once again, LGTM. In
> particular, I think 0002 & 0003 makes VM bits management more simple.

Thanks for the review!

> My only review comment is about 0003:
> Should we make frz_conflict_horizon not a heap_page_will_freeze's
> argument but rather just another field of PruneState struct? If i'm
> not mistaken, 'frz_conflict_horizon' fits good to be a part of pruning
> state

Since it is passed into one of the helpers, I think I agree. Attached
v21 has this change.

- Melanie

Attachment Content-Type Size
v21-0001-Refactor-heap_page_prune_and_freeze-parameters-i.patch text/x-patch 13.0 KB
v21-0002-Keep-all_frozen-updated-in-heap_page_prune_and_f.patch text/x-patch 9.2 KB
v21-0003-Update-PruneState.all_-visible-frozen-earlier-in.patch text/x-patch 9.5 KB
v21-0004-Split-heap_page_prune_and_freeze-into-helpers.patch text/x-patch 25.4 KB
v21-0005-Eliminate-XLOG_HEAP2_VISIBLE-from-vacuum-phase-I.patch text/x-patch 43.4 KB
v21-0006-Eliminate-XLOG_HEAP2_VISIBLE-from-empty-page-vac.patch text/x-patch 2.5 KB
v21-0007-Remove-XLOG_HEAP2_VISIBLE-entirely.patch text/x-patch 26.2 KB
v21-0008-Rename-GlobalVisTestIsRemovableXid-to-GlobalVisX.patch text/x-patch 8.0 KB
v21-0009-Use-GlobalVisState-in-vacuum-to-determine-page-l.patch text/x-patch 10.5 KB
v21-0010-Unset-all_visible-sooner-if-not-freezing.patch text/x-patch 2.4 KB
v21-0011-Allow-on-access-pruning-to-set-pages-all-visible.patch text/x-patch 37.7 KB
v21-0012-Set-pd_prune_xid-on-insert.patch text/x-patch 6.7 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2025-11-19 23:23:25 Re: 10% drop in code line count in PG 17
Previous Message Masahiko Sawada 2025-11-19 22:56:07 Re: Add support for COPY TO in tablesync for partitioned tables.