Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eeS7m-0001pf-Lp for pgsql-hackers@arkaria.postgresql.org; Wed, 24 Jan 2018 20:58:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eeS7m-00089J-3o for pgsql-hackers@arkaria.postgresql.org; Wed, 24 Jan 2018 20:58:26 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eeS7l-000898-IP for pgsql-hackers@lists.postgresql.org; Wed, 24 Jan 2018 20:58:25 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eeS7i-0005cE-RZ for pgsql-hackers@postgresql.org; Wed, 24 Jan 2018 20:58:24 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w0OKwGxq019266; Wed, 24 Jan 2018 15:58:16 -0500 From: Tom Lane To: Andres Freund cc: Alvaro Herrera , Robert Haas , Thomas Munro , "pgsql-hackers@postgresql.org" Subject: Re: pgsql: Add parallel-aware hash joins. In-reply-to: <20180124204359.ognamsfdqbrfbazd@alap3.anarazel.de> References: <20180124182018.jx2h4wp6twqo7xix@alap3.anarazel.de> <20180124201826.g6vhuewpnycpt3ta@alvherre.pgsql> <20180124204359.ognamsfdqbrfbazd@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Wed, 24 Jan 2018 12:43:59 -0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <19264.1516827496.1@sss.pgh.pa.us> Date: Wed, 24 Jan 2018 15:58:16 -0500 Message-ID: <19265.1516827496@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Andres Freund writes: > On 2018-01-24 17:18:26 -0300, Alvaro Herrera wrote: >> Yeah, I proposed this a decade ago but never had the wits to write the >> code. > It shouldn't be too hard, right? Leaving defining the file format, > parsing it, creating the new schedule with depencencies and adapting > tests aside (hah), it mostly seems a relatively simple graph ordering / > topological sort problem, right? Yeah. We already have topo sort code in pg_dump, maybe we could push that into someplace like src/common or src/fe_utils? Although pg_dump hasn't got any need for edge weights, so maybe sharing code isn't worth it. We could flush the existing schedule files and use a simple format like testname: list of earlier tests it depends on (I guess there would be more properties than just the dependencies, but still not hard to parse.) > If we keep the timings from an earlier > run somwhere, we can use the timing of runs as edge weights, making the > schedule better. I think we could just use constant values hand-coded in the schedule file. It might occasionally be worth updating them, but realistically it's not going to matter that they be very accurate. Probably weights like 1, 2, and 3 would be plenty ;-) regards, tom lane