Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eXYDA-0007jt-2O for pgsql-hackers@arkaria.postgresql.org; Fri, 05 Jan 2018 20:03:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eXYD9-0002JX-3Y for pgsql-hackers@arkaria.postgresql.org; Fri, 05 Jan 2018 20:03:27 +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 1eXYD8-0002JN-TT for pgsql-hackers@lists.postgresql.org; Fri, 05 Jan 2018 20:03:26 +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.89) (envelope-from ) id 1eXYD5-000273-VP for pgsql-hackers@postgresql.org; Fri, 05 Jan 2018 20:03:26 +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 w05K3Jfd010715; Fri, 5 Jan 2018 15:03:19 -0500 From: Tom Lane To: Robert Haas cc: Thomas Munro , Andres Freund , Pg Hackers Subject: Re: Condition variable live lock In-reply-to: References: <20171229193843.tsbob2xsjfmxkq2g@alap3.anarazel.de> <20180104205447.mdaub47aunp3h3mq@alap3.anarazel.de> <17054.1515126429@sss.pgh.pa.us> <21761.1515132657@sss.pgh.pa.us> <23234.1515134575@sss.pgh.pa.us> <15204.1515166090@sss.pgh.pa.us> <14191.1515173593@sss.pgh.pa.us> <9342.1515181117@sss.pgh.pa.us> Comments: In-reply-to Robert Haas message dated "Fri, 05 Jan 2018 14:52:38 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <10712.1515182599.1@sss.pgh.pa.us> Date: Fri, 05 Jan 2018 15:03:19 -0500 Message-ID: <10713.1515182599@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Robert Haas writes: > On Fri, Jan 5, 2018 at 2:38 PM, Tom Lane wrote: >> * I think the Asserts in ConditionVariablePrepareToSleep and >> ConditionVariableSleep ought to be replaced by full-fledged test and >> elog(ERROR), so that they are enforced even in non-assert builds. >> I don't have a lot of confidence that corner cases that could violate >> those usage restrictions would get caught during developer testing. >> Nor do I see an argument that we can't afford the cycles to check. > I think those usage restrictions are pretty basic, and I think this > might be used in some places where performance does matter. So -1 > from me for this change. Really? We're about to do a process sleep, and we can't afford a single test and branch to make sure we're doing it sanely? >> * A lot of the comments could be improved, IMHO. > No opinion without seeing what you propose to change. OK, will put out a proposal. regards, tom lane