Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b6KHf-00046E-UC for pgsql-hackers@arkaria.postgresql.org; Fri, 27 May 2016 16:06:48 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1b6KHf-0006JR-H9 for pgsql-hackers@arkaria.postgresql.org; Fri, 27 May 2016 16:06:47 +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 1b6KHe-0006IX-06 for pgsql-hackers@postgresql.org; Fri, 27 May 2016 16:06:46 +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.84_2) (envelope-from ) id 1b6KHb-0005zx-GI for pgsql-hackers@postgresql.org; Fri, 27 May 2016 16:06:44 +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 u4RG6e6C011797; Fri, 27 May 2016 12:06:40 -0400 From: Tom Lane To: Michael Paquier cc: Amit Kapila , =?UTF-8?Q?Armin_Sch=C3=B6ffmann?= , "pgsql-hackers@postgresql.org" Subject: Re: PATCH: pg_restore parallel-execution-deadlock issue In-reply-to: References: <29376.1464298553@sss.pgh.pa.us> Comments: In-reply-to Michael Paquier message dated "Fri, 27 May 2016 21:03:14 +0900" Date: Fri, 27 May 2016 12:06:40 -0400 Message-ID: <11796.1464365200@sss.pgh.pa.us> X-Pg-Spam-Score: -3.3 (---) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Michael Paquier writes: > On Fri, May 27, 2016 at 4:07 PM, Amit Kapila wrote: >> On Fri, May 27, 2016 at 3:05 AM, Tom Lane wrote: >>> 2. Armin proposes that WaitForTerminatingWorkers needs to do CloseHandle() >>> on the various thread handles. That sounds plausible but I don't know >>> enough Windows programming to know if it really matters. >>> >>> 3. Should we replace ExitThread() with _endthreadex()? Again, it >>> seems plausible but I'm not the person to ask. >> I think point (2) and (3) are related because using _endthreadex won't close >> the thread handle explicitly [1]. > Yep. OK, I pushed something based on that. It's untested by me but the buildfarm should tell us if I broke anything too badly. I believe we've now dealt with all the issues originally raised by Armin, so I've marked this patch committed in the CF app. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers