From: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
---|---|
To: | Aleksander Alekseev <a(dot)alekseev(at)postgrespro(dot)ru> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Robert Haas <rhaas(at)postgresql(dot)org>, Andres Freund <andres(at)anarazel(dot)de> |
Subject: | Re: Yet another small patch - reorderbuffer.c:1099 |
Date: | 2016-04-05 01:00:41 |
Message-ID: | CAB7nPqTvzAxvTuBQh+MTuPVfwHUeMq30z0hrVT3fWoYD-q71gA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Apr 5, 2016 at 1:03 AM, Aleksander Alekseev
<a(dot)alekseev(at)postgrespro(dot)ru> 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(&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.
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.
--
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | David Rowley | 2016-04-05 01:09:54 | Re: oversight in parallel aggregate |
Previous Message | Armin Schöffmann | 2016-04-05 00:28:45 | PATCH: pg_restore parallel-execution-deadlock issue |