Re: All-visible pages with valid prune xid are confusing - Mailing list pgsql-hackers

From Andres Freund
Subject Re: All-visible pages with valid prune xid are confusing
Date
Msg-id E5E41BF8-1515-488A-A65D-6A1CFC716238@anarazel.de
Whole thread Raw
In response to Re: All-visible pages with valid prune xid are confusing  (Melanie Plageman <melanieplageman@gmail.com>)
Responses Re: All-visible pages with valid prune xid are confusing
List pgsql-hackers
Hi,

On December 2, 2025 1:23:57 PM EST, Melanie Plageman <melanieplageman@gmail.com> wrote:
>On Tue, Dec 2, 2025 at 12:49 PM Heikki Linnakangas <hlinnaka@iki.fi> wrote:
>>
>> Hmm. If the page has no prunable tuples left, it makes sense to set
>> pd_prune_xid to InvalidTransactionId to avoid the useless round of
>> pruning. In other cases, it would make sense to set it to some XID so
>> that it gets pruned later. But a standby will only start pruning if it's
>> later promoted to become a primary. At that point, all currently running
>> transactions will be finished (except for prepared transactions).
>
>What about on-access pruning during SELECT queries on a hot standby?

There's no on-access-pruning on the hot standby itself, it'd lead to divergence between primary and standby (and you
couldn'tWAL log it). 

Greetings,

Andres

--
Sent from my Android device with K-9 Mail. Please excuse my brevity.



pgsql-hackers by date:

Previous
From: Melanie Plageman
Date:
Subject: Re: All-visible pages with valid prune xid are confusing
Next
From: Sami Imseih
Date:
Subject: Re: use LW_SHARED in dsa_get_total_size()