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

From: Andrey Borodin <x4mmm(at)yandex-team(dot)ru>
To: Melanie Plageman <melanieplageman(at)gmail(dot)com>
Cc: Alexander Lakhin <exclusion(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Tomas Vondra <tomas(at)vondra(dot)me>, David Rowley <dgrowleyml(at)gmail(dot)com>, Kirill Reshke <reshkekirill(at)gmail(dot)com>, Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, Xuneng Zhou <xunengzhou(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, 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: 2026-09-21 08:37:00
Message-ID: F9BF304E-1298-481C-829A-B4E10AED025A@yandex-team.ru
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2026-09-21 08:43:26 Re: Serverside SNI support in libpq
Previous Message Zhijie Hou 2026-09-21 08:33:03 Re: Logical replication can lose an update after concurrent index invalidation