Re: pgsql: Add parallel-aware hash joins. - Mailing list pgsql-committers

From Thomas Munro
Subject Re: pgsql: Add parallel-aware hash joins.
Date
Msg-id CAEepm=3eS6ra8oBCYsYYjPNsPqb2R_TaGQK8SGRFq_7gbP8RUg@mail.gmail.com
Whole thread Raw
In response to Re: pgsql: Add parallel-aware hash joins.  (Andres Freund <andres@anarazel.de>)
Responses Re: pgsql: Add parallel-aware hash joins.  (Thomas Munro <thomas.munro@enterprisedb.com>)
List pgsql-committers
On Thu, Dec 21, 2017 at 10:55 PM, Andres Freund <andres@anarazel.de> wrote:
> Thomas, I wonder if the problem is that PHJ_GROW_BATCHES_ELECTING
> updates, via ExecParallelHashJoinSetUpBatches(), HashJoinTable->nbatch,
> while other backends also access ->nbatch in
> ExecParallelHashCloseBatchAccessors(). Both happens after waiting for
> the WAIT_EVENT_HASH_GROW_BATCHES_ELECTING phase.
>
> That'd lead to ExecParallelHashCloseBatchAccessors() likely not finish
> writing all batches (because nbatch < nbatch_old), which seems like it'd
> explain this?

I don't think that's quite it, because it should never have set
'writing' for any batch number >= nbatch.

It's late here, but I'll take this up tomorrow and either find a fix
or figure out how to avoid antisocial noise levels on the build farm
in the meantime.

-- 
Thomas Munro
http://www.enterprisedb.com


pgsql-committers by date:

Previous
From: Andres Freund
Date:
Subject: Re: pgsql: Add parallel-aware hash joins.
Next
From: Robert Haas
Date:
Subject: pgsql: Cancel CV sleep during subtransaction abort.