Re: [HACKERS] Yet another small patch - reorderbuffer.c:1099

2016-09-05 Thread Aleksander Alekseev
> I looked at this and can see some of the argument on both sides, but > if it's setting off static-analyzer warnings for some people, that > seems like a sufficient reason to change it. We certainly make more > significant changes than this in order to silence warnings. > > I rewrote the comment

Re: [HACKERS] Yet another small patch - reorderbuffer.c:1099

2016-09-04 Thread Tom Lane
Andres Freund writes: > On 2016-04-05 11:38:27 -0300, Alvaro Herrera wrote: >> The current arrangement looks bizantine to me, for no reason. If we >> think that one of the two branches might do something additional to the >> list deletion, surely that will be in a separate stanza with its own >>

Re: [HACKERS] Yet another small patch - reorderbuffer.c:1099

2016-04-06 Thread Andres Freund
On 2016-04-05 11:38:27 -0300, Alvaro Herrera wrote: > IMO the code is wrong. I'm a bit confused how an intentionally duplicated block makes code wrong... But whatever, I found it to be clerarer that way, but apparently I'm alone. > The current arrangement looks bizantine to me, for no reason.

Re: [HACKERS] Yet another small patch - reorderbuffer.c:1099

2016-04-06 Thread Aleksander Alekseev
> > IMO the code is wrong. There should be a single block comment > > saying something like "Remove the node from its containing list. > > In the FOO case, the list corresponds to BAR and therefore we > > delete it because BAZ. In the QUUX case the list is PLUGH and we > > delete in because THUD.

Re: [HACKERS] Yet another small patch - reorderbuffer.c:1099

2016-04-05 Thread Robert Haas
On Tue, Apr 5, 2016 at 10:38 AM, Alvaro Herrera wrote: > IMO the code is wrong. There should be a single block comment saying > something like "Remove the node from its containing list. In the FOO > case, the list corresponds to BAR and therefore we delete it because > BAZ. In the QUUX case the

Re: [HACKERS] Yet another small patch - reorderbuffer.c:1099

2016-04-05 Thread Alvaro Herrera
Simon Riggs wrote: > On 5 April 2016 at 10:12, Andres Freund wrote: > > > On 2016-04-05 12:07:40 +0300, Aleksander Alekseev wrote: > > > > I recall discussing this code with Andres, and I think that he has > > > > mentioned me this is intentional, because should things be changed for > > > > a re

Re: [HACKERS] Yet another small patch - reorderbuffer.c:1099

2016-04-05 Thread Simon Riggs
On 5 April 2016 at 10:12, Andres Freund wrote: > On 2016-04-05 12:07:40 +0300, Aleksander Alekseev wrote: > > > I recall discussing this code with Andres, and I think that he has > > > mentioned me this is intentional, because should things be changed for > > > a reason or another in the future,

Re: [HACKERS] Yet another small patch - reorderbuffer.c:1099

2016-04-05 Thread Andres Freund
On 2016-04-05 12:07:40 +0300, Aleksander Alekseev wrote: > > I recall discussing this code with Andres, and I think that he has > > mentioned me this is intentional, because should things be changed for > > a reason or another in the future, we want to keep in mind that a list > > of TXIDs and a li

Re: [HACKERS] Yet another small patch - reorderbuffer.c:1099

2016-04-05 Thread Aleksander Alekseev
> I recall discussing this code with Andres, and I think that he has > mentioned me this is intentional, because should things be changed for > a reason or another in the future, we want to keep in mind that a list > of TXIDs and a list of sub-TXIDs should be handled differently. I see. If this it

Re: [HACKERS] Yet another small patch - reorderbuffer.c:1099

2016-04-04 Thread Michael Paquier
On Tue, Apr 5, 2016 at 1:03 AM, Aleksander Alekseev wrote: > There is weird peace of code in reorderbuffer.c: > > ``` > /* delete from list of known subxacts */ > if (txn->is_known_as_subxact) > { > /* NB: nsubxacts count of parent will be too high now */ > dlist_delete

[HACKERS] Yet another small patch - reorderbuffer.c:1099

2016-04-04 Thread Aleksander Alekseev
Hello There is weired peace of code in reorderbuffer.c: ``` /* delete from list of known subxacts */ if (txn->is_known_as_subxact) { /* NB: nsubxacts count of parent will be too high now */ dlist_delete(&txn->node); } /* delete from LSN ordered list of