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

From Andrey Borodin
Subject Re: eliminate xl_heap_visible to reduce WAL (and eventually set VM on-access)
Date
Msg-id F9BF304E-1298-481C-829A-B4E10AED025A@yandex-team.ru
Whole thread
In response to Re: eliminate xl_heap_visible to reduce WAL (and eventually set VM on-access)  (Melanie Plageman <melanieplageman@gmail.com>)
Responses Re: eliminate xl_heap_visible to reduce WAL (and eventually set VM on-access)
List pgsql-hackers
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.

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

Thank you!


Best regards, Andrey Borodin.




pgsql-hackers by date:

Previous
From: Zhijie Hou
Date:
Subject: Re: Logical replication can lose an update after concurrent index invalidation
Next
From: Daniel Gustafsson
Date:
Subject: Re: Serverside SNI support in libpq