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>, Andrey Borodin <x4mmm(at)yandex-team(dot)ru>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Subject: Re: eliminate xl_heap_visible to reduce WAL (and eventually set VM on-access)
Date: 2025-09-08 15:44:24
Message-ID: CAAKRu_Y=QZ5iD7zt1AHcG3_G_iMR0w6ApGPgr8FKcDn-YLFvuQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Sep 5, 2025 at 6:20 PM Melanie Plageman
<melanieplageman(at)gmail(dot)com> wrote:
>
> > On 2025-09-02 19:11:01 -0400, Melanie Plageman wrote:
> > > From dd98177294011ee93cac122405516abd89f4e393 Mon Sep 17 00:00:00 2001
> > > From: Melanie Plageman <melanieplageman(at)gmail(dot)com>
> > > Date: Wed, 27 Aug 2025 08:50:15 -0400
> > > Subject: [PATCH v8 01/22] Remove unneeded VM pin from VM replay
>
> I didn't push it yet because I did a new version that actually
> eliminates the asserts in heap_multi_insert() before calling
> visibilitymap_set() -- since they are redundant with checks inside
> visibilitymap_set(). 0001 of attached v9 is what I plan to push,
> barring any objections.

I pushed this, so rebased v10 is attached. I've added one new patch:
0002 adds ERRCODE_DATA_CORRUPTED to the existing log messages about
VM/data corruption in vacuum. Andrey Borodin earlier suggested this,
and I had neglected to include it.

- Melanie

Attachment Content-Type Size
v10-0002-Add-error-codes-to-vacuum-VM-corruption-case-log.patch text/x-patch 2.3 KB
v10-0003-Eliminate-xl_heap_visible-in-COPY-FREEZE.patch text/x-patch 11.3 KB
v10-0001-Remove-unused-xl_heap_prune-member-reason.patch text/x-patch 1.1 KB
v10-0004-Make-heap_page_is_all_visible-independent-of-LVR.patch text/x-patch 5.4 KB
v10-0005-Eliminate-xl_heap_visible-from-vacuum-phase-III.patch text/x-patch 28.4 KB
v10-0006-Use-xl_heap_prune-record-for-setting-empty-pages.patch text/x-patch 5.8 KB
v10-0009-Find-and-fix-VM-corruption-in-heap_page_prune_an.patch text/x-patch 12.0 KB
v10-0008-Combine-vacuum-phase-I-VM-update-cases.patch text/x-patch 5.8 KB
v10-0010-Keep-all_frozen-updated-too-in-heap_page_prune_a.patch text/x-patch 3.1 KB
v10-0007-Combine-lazy_scan_prune-VM-corruption-cases.patch text/x-patch 7.4 KB
v10-0012-Eliminate-xl_heap_visible-from-vacuum-phase-I-pr.patch text/x-patch 29.0 KB
v10-0011-Update-VM-in-pruneheap.c.patch text/x-patch 12.5 KB
v10-0014-Remove-xl_heap_visible-entirely.patch text/x-patch 24.1 KB
v10-0013-Rename-PruneState.freeze-to-attempt_freeze.patch text/x-patch 4.1 KB
v10-0016-Use-GlobalVisState-to-determine-page-level-visib.patch text/x-patch 10.8 KB
v10-0018-Unset-all-visible-sooner-if-not-freezing.patch text/x-patch 2.5 KB
v10-0015-Rename-GlobalVisTestIsRemovableXid-to-GlobalVisX.patch text/x-patch 7.1 KB
v10-0017-Inline-TransactionIdFollows-Precedes.patch text/x-patch 5.0 KB
v10-0020-Add-helper-functions-to-heap_page_prune_and_free.patch text/x-patch 18.9 KB
v10-0019-Allow-on-access-pruning-to-set-pages-all-visible.patch text/x-patch 27.3 KB
v10-0021-Reorder-heap_page_prune_and_freeze-parameters.patch text/x-patch 5.8 KB
v10-0022-Set-pd_prune_xid-on-insert.patch text/x-patch 6.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2025-09-08 15:51:08 Re: issue with synchronized_standby_slots
Previous Message Robert Haas 2025-09-08 15:40:36 Re: [PG19-3 PATCH] Don't ignore passfile