Re: Query running for very long time (server hanged) with parallel append

From: Amit Khandekar <amitdkhan(dot)pg(at)gmail(dot)com>
To: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>, Rajkumar Raghuwanshi <rajkumar(dot)raghuwanshi(at)enterprisedb(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Query running for very long time (server hanged) with parallel append
Date: 2018-02-06 16:32:35
Message-ID: CAJ3gD9ea3ZSACe4CHM6hCLu3knE=-YwQ-PqhGempn_0nU78u7w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 6 February 2018 at 16:11, Kyotaro HORIGUCHI
<horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp> wrote:
> Thanks for the explanation. I'm fine with it. Well may I make
> some comments on the patch?

Sure, always welcome.

>
> - It seems to me that the if (!should_warp_around) block and else
> block are better be transposed so that make the bail out code
> closer to the exit condition check as the previous code
> was. (In other was the second block should be if
> (should_wrap...), not if (!should_warp..).

Yeah, I think it looks equally good that way, and like you said, the
current code does it that way. So in the attached patch, I have
swapped the two conditions.

>
> - The following comment needs a "the" before the "first", maybe.
> + /* Loop back to first partial plan. */

Now since we are not changing this line in the patch, I have avoided
that. But the committer can very well make this change, all though I
am not sure myself about the grammar.

--
Thanks,
-Amit Khandekar
EnterpriseDB Corporation
The Postgres Database Company

Attachment Content-Type Size
fix_hang_issue_v2.patch application/octet-stream 1.8 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2018-02-06 16:33:59 Re: Temporary tables prevent autovacuum, leading to XID wraparound
Previous Message Peter Geoghegan 2018-02-06 16:32:08 Re: pgsql: Support parallel btree index builds.