On 2021-04-09 16:27:39 -0700, Andres Freund wrote:
> Just looking at the code in heap_update: I'm a bit confused about
> RelationGetBufferForTuple()'s vmbuffer and vmbuffer_other
> arguments. It looks like it's not at all clear which of the two
> arguments will have the vmbuffer for which of the pages?
>
> if (otherBuffer == InvalidBuffer || targetBlock <= otherBlock)
> GetVisibilityMapPins(relation, buffer, otherBuffer,
> targetBlock, otherBlock, vmbuffer,
> vmbuffer_other);
> else
> GetVisibilityMapPins(relation, otherBuffer, buffer,
> otherBlock, targetBlock, vmbuffer_other,
> vmbuffer);
Oh, I missed that the arguments to GetVisibilityMapPins are
appropriately swapped too.
Greetings,
Andres Freund