Hi,

On 2023-03-28 19:17:21 -0700, Andres Freund wrote:
> On 2023-03-28 18:21:02 -0700, Andres Freund wrote:
> > Here's a draft patch.
> 
> Attached is v2, with a stupid bug fixed and a bit of comment / pgindent
> polish.

I'd welcome some review (Tomas?), but otherwise I'm planning to push ahead
with this.

I'm still debating with myself whether this commit (or a prerequisite commit)
should move logic dealing with the buffer ordering into
GetVisibilityMapPins(), so we don't need two blocks like this:


                if (otherBuffer == InvalidBuffer || targetBlock <= otherBlock)
                        GetVisibilityMapPins(relation, buffer, otherBuffer,
                                                                 targetBlock, 
otherBlock, vmbuffer,
                                                                 
vmbuffer_other);
                else
                        GetVisibilityMapPins(relation, otherBuffer, buffer,
                                                                 otherBlock, 
targetBlock, vmbuffer_other,
                                                                 vmbuffer);
...

                if (otherBuffer != InvalidBuffer)
                {
                        if (GetVisibilityMapPins(relation, otherBuffer, buffer,
                                                                         
otherBlock, targetBlock, vmbuffer_other,
                                                                         
vmbuffer))
                                unlockedTargetBuffer = true;
                }
                else
                {
                        if (GetVisibilityMapPins(relation, buffer, 
InvalidBuffer,
                                                                         
targetBlock, InvalidBlockNumber,
                                                                         
vmbuffer, InvalidBuffer))
                                unlockedTargetBuffer = true;
                }
        }


Greetings,

Andres Freund


Reply via email to