Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b62wl-0000s7-4S for pgsql-hackers@arkaria.postgresql.org; Thu, 26 May 2016 21:36:03 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1b62wk-0001aP-JD for pgsql-hackers@arkaria.postgresql.org; Thu, 26 May 2016 21:36:02 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1b62wj-0001Zf-Aj for pgsql-hackers@postgresql.org; Thu, 26 May 2016 21:36:01 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1b62wg-0008Vw-7x for pgsql-hackers@postgresql.org; Thu, 26 May 2016 21:36:00 +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 u4QLZrUt029377; Thu, 26 May 2016 17:35:53 -0400 From: Tom Lane To: Michael Paquier cc: =?UTF-8?Q?Armin_Sch=C3=B6ffmann?= , "pgsql-hackers@postgresql.org" Subject: Re: PATCH: pg_restore parallel-execution-deadlock issue In-reply-to: References: Comments: In-reply-to Michael Paquier message dated "Wed, 25 May 2016 12:17:47 -0700" Date: Thu, 26 May 2016 17:35:53 -0400 Message-ID: <29376.1464298553@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: > ea274b2 has changed the way disconnection is done is is now closing > both the read and write pipes. So you may want to retry if things get > better with the next round of minor releases. Hadn't paid attention to this thread before ... It looks like there are still a few things we need to deal with before considering Armin's submission resolved: 1. Armin proposes using "shutdown(pipeWrite, SD_BOTH)" where the code committed this morning (df8d2d8c4) has "closesocket(pipeWrite)". I'd prefer to leave it that way since it's the same as for the Unix case, and Kyotaro-san says it works for him. Is there a reason we'd need shutdown() instead? 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. 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