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

From Melanie Plageman
Subject Re: eliminate xl_heap_visible to reduce WAL (and eventually set VM on-access)
Date
Msg-id CAAKRu_aXuDQxVLFz__=M=YLOFJE=YMVkf9zb6QrtQ6bFx66xdQ@mail.gmail.com
Whole thread
In response to Re: eliminate xl_heap_visible to reduce WAL (and eventually set VM on-access)  (Andrey Borodin <x4mmm@yandex-team.ru>)
Responses Re: eliminate xl_heap_visible to reduce WAL (and eventually set VM on-access)
List pgsql-hackers
Thanks for the review.

On Mon, Sep 21, 2026 at 4:37 AM Andrey Borodin <x4mmm@yandex-team.ru> wrote:
>
> On Fri, Sep 18, 2026, Melanie Plageman wrote:
> > Pruning and freezing
> > always required a cleanup lock in recovery
>
> Could 0002 use just do_prune instead of do_prune || do_freeze?
> The comment for XLHP_CLEANUP_LOCK allows freezing under an ordinary
> exclusive lock. Before pruning and freezing shared a WAL record,
> freeze-only replay in heap_xlog_freeze_page() used normal exclusive
> lock IIUC.
>
> With 0002 I observe VACUUM FREEZE on a page containing only live
> tuples to terminate a standby cursor holding a pin. Using just do_prune
> lets replay finish without canceling the cursor.

Good point. I see this brought up also in [1]

> 0001, 0003 and 0004 look good to me. I tried 0003/0004 with a manual
> primary/standby test, but found nothing interesting.

I've tightened up the commit messages in the latest version and
changed 0002 as you suggested. I'll commit 0001-0003 after beta4 is
tagged tomorrow. 0004 I'm going to think about just a bit longer (and
would be master only).

- Melanie

[1] https://www.postgresql.org/message-id/CAHg%2BQDf3NcB3vOAqQ5EFcV5DYYUZ9snCSJAU-x1JDbtcjK3eBQ%40mail.gmail.com

Attachment

pgsql-hackers by date:

Previous
From: Jacob Champion
Date:
Subject: Re: [PATCH] Explain what the default output_plugin_libraries do
Next
From: Bharath Rupireddy
Date:
Subject: Re: Add a hook for handling logical decoding messages on subscribers.