Yet another small patch - reorderbuffer.c:1099

From: Aleksander Alekseev <a(dot)alekseev(at)postgrespro(dot)ru>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Cc: Robert Haas <rhaas(at)postgresql(dot)org>, Andres Freund <andres(at)anarazel(dot)de>
Subject: Yet another small patch - reorderbuffer.c:1099
Date: 2016-04-04 16:03:45
Message-ID: 20160404190345.54d84ee8@fujitsu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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 toplevel TXNs */
else
{
dlist_delete(&txn->node);
}
```

As you see `if` an `else` branches are exactly the same. I wonder
whether this is a bug or code just requires a bit of cleaning. In the
latter case here is a patch.

According to `git log` both branches were introduced in one commit
b89e1510. I added author and committer of this code to CC since they
have much better understanding of it than I do.

--
Best regards,
Aleksander Alekseev
http://eax.me/

Attachment Content-Type Size
reorderbuffer.diff text/x-patch 711 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Shulgin, Oleksandr 2016-04-04 16:07:19 Re: SSL indicator in psql prompt
Previous Message David Steele 2016-04-04 15:57:50 Re: [PROPOSAL] Client Log Output Filtering