Re: minor fix in CancelVirtualTransaction

2019-02-03 Thread Andres Freund
Hi, On 2019-01-11 18:35:13 -0300, Alvaro Herrera wrote: > On 2019-Jan-04, Peter Eisentraut wrote: > > > Your reasoning seems correct to me. > > > > Maybe add a code comment along the lines of "once we have found the > > right ... we don't need to check the remaining ...". > > > > Or, you can ma

Re: minor fix in CancelVirtualTransaction

2019-01-11 Thread Alvaro Herrera
On 2019-Jan-04, Peter Eisentraut wrote: > Your reasoning seems correct to me. > > Maybe add a code comment along the lines of "once we have found the > right ... we don't need to check the remaining ...". > > Or, you can make this even more clear by comparing the backendId > directly with the pr

Re: minor fix in CancelVirtualTransaction

2019-01-04 Thread Peter Eisentraut
On 06/12/2018 21:37, Alvaro Herrera wrote: > When scanning the list of virtual transactions looking for one > particular vxid, we cancel the transaction *and* break out of the loop > only if both backendId and localTransactionId matches us. The canceling > part is okay, but limiting the break to t

Re: minor fix in CancelVirtualTransaction

2018-12-06 Thread Alvaro Herrera
Same patch, commit message added. Adding to commitfest. -- Álvaro Herrerahttps://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services >From 2cbe6fe5ac7617e424a63b820a6a2c83b712bab5 Mon Sep 17 00:00:00 2001 From: Alvaro Herrera Date: Thu, 6 D

minor fix in CancelVirtualTransaction

2018-06-29 Thread Alvaro Herrera
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