minor fix in CancelVirtualTransaction

Поиск
Список
Период
Сортировка
Искать
От
Alvaro Herrera
Тема
minor fix in CancelVirtualTransaction
Дата
Msg-id
20180629170512.d6kof6l6uu3qqpd6@alvherre.pgsql
Список
Дерево обсуждения
minor fix in CancelVirtualTransaction Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: minor fix in CancelVirtualTransaction Alvaro Herrera <alvherre@2ndquadrant.com>
Re: minor fix in CancelVirtualTransaction Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: minor fix in CancelVirtualTransaction Alvaro Herrera <alvherre@2ndquadrant.com>
Re: minor fix in CancelVirtualTransaction Andres Freund <andres@anarazel.de>
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/
В списке pgsql-hackers по дате отправления
От: Daniel Gustafsson
Дата:
От: Andres Freund
Дата:
FAQ