Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ieNiR-0003nL-9h for pgsql-hackers@arkaria.postgresql.org; Mon, 09 Dec 2019 18:25:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ieNiQ-0007Je-3x for pgsql-hackers@arkaria.postgresql.org; Mon, 09 Dec 2019 18:25:02 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ieNiP-0007Ir-6U for pgsql-hackers@lists.postgresql.org; Mon, 09 Dec 2019 18:25:01 +0000 Received: from mail-oi1-x231.google.com ([2607:f8b0:4864:20::231]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ieNiK-0008Fx-Mi for pgsql-hackers@lists.postgresql.org; Mon, 09 Dec 2019 18:24:59 +0000 Received: by mail-oi1-x231.google.com with SMTP id x14so7202037oic.10 for ; Mon, 09 Dec 2019 10:24:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=from:subject:to:cc:references:openpgp:autocrypt:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=E5dDrEV9WS/hW1UZQk+5rIldSv0bc0z4YRRF+s22nLk=; b=agOrEnNLUcAQaKQTTHdP2sJAjRRdhMD0PUCxSIbNweJJWwDYCfMKKYvmPiGj516Qqk a3orBKLng0Vy+fbgk/X01sUUqcYEWP11/pbtWP7jSn0xj9M6vKtNjs6GnySvFvXeW18h 4LBrJzskCOjPiLqY0fsWZRLyI6tAyzKwAV58pwcsbu3uRymb7AQC6NPAQuXQG58yyoJh xu98/0l8URGWwqwJPFJrS0zg8y2fQewSFWOaU28tPCoaKZk7z4TOD5GqgDDh5kj4JS2t 31/mDyT25A717gv9+Z694Q5e33BqKEBoUgYVSyX1dswqqy/AYabGSWJDfskp9WUUTWGM MSzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:references:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-transfer-encoding:content-language; bh=E5dDrEV9WS/hW1UZQk+5rIldSv0bc0z4YRRF+s22nLk=; b=p73Swc/BEyD8MUq6pqbIioRm1LbAgTTP3+4U+AHIHgmzS/WzNc3obLRWeRMQTdqo4L 3/yuMOccAjmWz5nw3yMtP3wB5uhlPvl40U4BvzsCr01aZ2pCwfqtyQRF/JSzlmD9hviG D2ad0pp/Yu6LEukcfZHFldxJXbLxof1o60IPHOsVAmqkKoE5AQNqFd53QSYYzukTMGar plDSXlCv5JAFc28SrKh4hngeTGK/vTXqfXj+/PK5ZTdwkQhbgjNy11nIjIZ/a31r/fxg NmpkQAQ9jqR3Stcn2Pu+yMOPNUMU0mcs9p40PNRyuNID+5v3w/+8kt3fvvGL1SB4bdTi 7iIw== X-Gm-Message-State: APjAAAUnXDQkaiJwMyFkr3EqpQVHr5uE7ShsbbqC2bnUvhc4FiXpuSxU 5gOxMJv6feJfWNgekNGviZJOymiVrDMn6tS8BEFd7v7TesKTS+sc4n9QXAk7aBjAH8yW30rNiO5 kITV8ze/EdV7xe2Sh6rfKxLC9us7gQtTz4BYyxkvpB7D3pqzeag3BRAmFzszneDcbaLaR5HVMia C7BvXiL8sWYlkjKFSQsdX2 X-Google-Smtp-Source: APXvYqzaoL1Bz8ueiwu+T0o0z5ugDAIFiXt5tFOHcDg6R+unljsx7tt3OcsL/AzLLMtX5e0FtNJ6Uw== X-Received: by 2002:aca:520b:: with SMTP id g11mr318715oib.167.1575915895389; Mon, 09 Dec 2019 10:24:55 -0800 (PST) Received: from [192.168.10.146] (99-10-92-30.lightspeed.rlghnc.sbcglobal.net. [99.10.92.30]) by smtp.gmail.com with ESMTPSA id a136sm284906oib.28.2019.12.09.10.24.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 09 Dec 2019 10:24:54 -0800 (PST) From: Andrew Dunstan X-Google-Original-From: Andrew Dunstan Subject: Re: Windows buildfarm members vs. new async-notify isolation test To: Tom Lane , Amit Kapila Cc: Magnus Hagander , Mark Dilger , PostgreSQL Hackers References: <32745.1575303812@sss.pgh.pa.us> <7221b3b4-fc7f-404d-5cf6-830d3aa6800d@2ndQuadrant.com> <362bca0b-1c1c-c760-ab19-b5d9a14c69ea@gmail.com> <13003.1575391248@sss.pgh.pa.us> <25746.1575436347@sss.pgh.pa.us> <20102.1575675105@sss.pgh.pa.us> <30330.1575739251@sss.pgh.pa.us> <4412.1575748586@sss.pgh.pa.us> <9110.1575824266@sss.pgh.pa.us> Openpgp: preference=signencrypt Autocrypt: addr=andrew.dunstan@2ndQuadrant.com; prefer-encrypt=mutual; keydata= xsBNBE7KWFkBCAClridxur2AIc7eW2AR7izbfp3EnNefie2HbLF0izW5Ik5UjX2HBXBx4syI gY6b0ugohXrr274+baoAlvSbq6cAoQuEVrk5IZFzt20b1Xkx65FwGSEj526yiKLocqkJceSq Xr9xcA5SGY+FZv441chh5SU92v4q6z+6LPpoHOh97ptAVXZYNTtU0LevyvD5lja0TzbvJm6C eFXitJfnm1pLEr0DGJCR/iUOl/N62Kh4855zZC7NHIjQHPOvV5Stz/l5ilDhvGVk+xkXFPys SjZoUr1rXhYLpiyi5sR0X9FHXT0KnGuz1F5ERO7ZTLSSQ6fJwPj6gOk9K+vvoKvoeql5ABEB AAHNL0FuZHJldyBEdW5zdGFuIDxhbmRyZXcuZHVuc3RhbkAybmRRdWFkcmFudC5jb20+wsCY BBMBAgBCAhsDBgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgBYhBOQ+WEYd/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qRDHJ6e5GCDHbH8USU+4wJBfPymZkd cA7NGm/mmWeJiWBFIDyjzYxrjku8ty9TZJVsaRXnS+OFQzXz9Eu2wTpKdHij46uY Message-ID: Date: Mon, 9 Dec 2019 13:24:53 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <9110.1575824266@sss.pgh.pa.us> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Content-Language: en-MW List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 12/8/19 11:57 AM, Tom Lane wrote: > I wrote: >> So, just idly looking at the code in src/backend/port/win32/signal.c >> and src/port/kill.c, I have to wonder why we have this baroque-looking >> design of using *two* signal management threads. And, if I'm >> reading it right, we create an entire new pipe object and an entire >> new instance of the second thread for each incoming signal. Plus, the >> signal senders use CallNamedPipe (hence, underneath, TransactNamedPipe) >> which means they in effect wait for the recipient's signal-handling >> thread to ack receipt of the signal. Maybe there's a good reason for >> all this but it sure seems like a lot of wasted cycles from here. > Here's a possible patch (untested by me) to get rid of the second thread > and the new-pipe-for-every-request behavior. I believe that the existing > logic may be based on Microsoft's "Multithreaded Pipe Server" example [1] > or something similar, but that's based on an assumption that servicing > a client request may take a substantial amount of time and it's worth > handling requests concurrently. Neither point applies in this context. > > Doing it like this seems attractive to me because it gets rid of two > different failure modes: inability to create a new thread and inability > to create a new pipe handle. Now on the other hand, it means that > inability to complete the read/write transaction with a client right > away will delay processing of other signals. But we know that the > client is engaged in a CallNamedPipe operation, so how realistic is > that concern? > > This is to be applied on top of the other patch I just sent. > > regards, tom lane > > [1] https://docs.microsoft.com/en-us/windows/win32/ipc/multithreaded-pipe-server Patch 1 fixed the problems on frogmouth. Patch 2 also ran without incident. tests run on REL_10_STABLE cheers andrew -- Andrew Dunstan https://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services