On 5/6/26 23:46, Melanie Plageman wrote:
> Thanks for the review! I incorporated all your suggestions in attached
> v2 unless otherwise noted below.
>
> Based on an LLM-assisted self-review of this code, I think there is a
> pre-existing bug in heap_lock_updated_tuple_rec() where we don't reset
> cleared_all_frozen and may have a stale value if we iterate more than
> once (new tuple versions) or use the l4 goto label (retries for the
> same tuple version). This could mean we unnecessarily clear all-frozen
> on the standby (and unnecessarily register the VM buffer after my
> patch). I couldn't come up with a repro though, so I didn't include a
> patch to fix it, as I wanted to confirm that someone else also thought
> this is a bug.
>
Hmm, would this be a correctness or efficiency issue?
I'm not very familiar with this code, so I can't say if there is an
issue or not. Could you explain the sequence of steps leading to an
issue? Maybe that assumes something that's not quite possible, or it
might help constructing a reproducer.
I don't quite see how could it be related to the "l4" goto label, when
all the "goto l4" cases are before setting "cleared_all_frozen = true"
(in any given iteration).
regards
--
Tomas Vondra