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 1ieht5-0005pt-Cy for pgsql-hackers@arkaria.postgresql.org; Tue, 10 Dec 2019 15:57:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ieht2-0003lw-LJ for pgsql-hackers@arkaria.postgresql.org; Tue, 10 Dec 2019 15:57:20 +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 1ieht2-0003lp-6d for pgsql-hackers@lists.postgresql.org; Tue, 10 Dec 2019 15:57:20 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iehsz-0001nn-MX for pgsql-hackers@lists.postgresql.org; Tue, 10 Dec 2019 15:57:19 +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 xBAFvD6L007255; Tue, 10 Dec 2019 10:57:14 -0500 From: Tom Lane To: Amit Kapila cc: Magnus Hagander , Andrew Dunstan , Mark Dilger , PostgreSQL Hackers Subject: Re: Windows buildfarm members vs. new async-notify isolation test In-reply-to: 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> Comments: In-reply-to Amit Kapila message dated "Tue, 10 Dec 2019 12:23:56 +0530" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <7253.1575993433.1@sss.pgh.pa.us> Date: Tue, 10 Dec 2019 10:57:13 -0500 Message-ID: <7254.1575993433@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Amit Kapila writes: > On Sun, Dec 8, 2019 at 10:27 PM Tom Lane wrote: >> 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? > Right, the client is engaged in a CallNamedPipe operation, but the > current mechanism can allow multiple such clients and that might lead > to faster processing of signals. It would only matter if multiple processes signal the same backend at the same time, which seems to me to be probably a very minority use-case. For the normal case of one signal arriving at a time, what I'm suggesting ought to be noticeably faster because of fewer kernel calls. Surely creating a new pipe instance and a new thread are not free. In any case, the main thing I'm on about here is getting rid of the failure modes. The existing code does have a rather lame/buggy workaround for the cant-create-new-pipe case. A possible answer for cant-create-new-thread might be to go ahead and service the current request locally in the long-lived signal thread. But that seems like it's piling useless (and hard to test) complexity on top of useless complexity. > Ideally, we can run a couple of tests to see if there is any help in > servicing the signals with this mechanism over proposed change on > different Windows machines, but is it really worth the effort? The failure modes I'm worried about are obviously pretty low-probability; if they were not, we'd be getting field reports about it. So I'm not sure how you can test your way to a conclusion about whether this is an improvement. But we're not in the business of ignoring failure modes just because they're low-probability. I'd argue that a kernel call that's not there is a kernel call that cannot fail, and therefore ipso facto an improvement. regards, tom lane