minor fix in CancelVirtualTransaction - Mailing list pgsql-hackers

From Alvaro Herrera
Subject minor fix in CancelVirtualTransaction
Date
Msg-id 20180629170512.d6kof6l6uu3qqpd6@alvherre.pgsql
Whole thread Raw
Responses Re: minor fix in CancelVirtualTransaction
List pgsql-hackers
It looks to me like we're missing a trick in CancelVirtualTransaction --
there's a loop to compare all VXIDs, and we break as soon as find a
perfect match in (backendid, localTransactionId).  However, once we've
found the backendId that matches, it's not possible for there to be
another entry with the same backendId, so we might as well just quit the
loop, even if we don't send a signal.

No, I don't know if this shows in profiles.  I just noticed while
reading code.

Attached patch (git diff --ignore-space-change; needs reindent)
illustrates.  This was added by commit efc16ea52067 (Dec 2009) and seems
unchanged since then.

-- 
Álvaro Herrera                         Developer, https://www.PostgreSQL.org/

Attachment

pgsql-hackers by date:

Previous
From: Daniel Gustafsson
Date:
Subject: Re: CREATE TABLE .. LIKE .. EXCLUDING documentation
Next
From: Andres Freund
Date:
Subject: Re: Failed assertion due to procedure created with SECURITY DEFINERoption