Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b8pP2-0004mx-Cb for pgsql-hackers@arkaria.postgresql.org; Fri, 03 Jun 2016 13:44:44 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1b8pP1-0007y4-Vk for pgsql-hackers@arkaria.postgresql.org; Fri, 03 Jun 2016 13:44:44 +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 1b8pP0-0007wR-4Z for pgsql-hackers@postgresql.org; Fri, 03 Jun 2016 13:44:42 +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 1b8pOt-0005Qn-0a for pgsql-hackers@postgresql.org; Fri, 03 Jun 2016 13:44:41 +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 u53DiUiC011516; Fri, 3 Jun 2016 09:44:30 -0400 From: Tom Lane To: Kyotaro HORIGUCHI cc: alvherre@2ndquadrant.com, pgsql-hackers@postgresql.org Subject: Re: Parallel pg_dump's error reporting doesn't work worth squat In-reply-to: <20160603.173055.230675706.horiguchi.kyotaro@lab.ntt.co.jp> References: <13183.1464880782@sss.pgh.pa.us> <20160602161711.GA239156@alvherre.pgsql> <20160603.173055.230675706.horiguchi.kyotaro@lab.ntt.co.jp> Comments: In-reply-to Kyotaro HORIGUCHI message dated "Fri, 03 Jun 2016 17:30:55 +0900" Date: Fri, 03 Jun 2016 09:44:30 -0400 Message-ID: <11515.1464961470@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 Kyotaro HORIGUCHI writes: > For sure, any of the "dangers" of TerminateThread don't matter > for this case. I think that this one: >> If the target thread is allocating memory from the heap, the heap >> lock will not be released. is potentially a hazard, which is why I made sure to use write_stderr later on in the console interrupt handler. Your original suggestion to use write_msg would end up going through fprintf, which might well use malloc internally. (It's possible that Windows' version of write() could too, I suppose, but that's probably as low-level as we are going to get.) 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