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 1hrXgK-0007U9-88 for pgsql-hackers@arkaria.postgresql.org; Sun, 28 Jul 2019 01:09:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hrXgI-0007JD-4B for pgsql-hackers@arkaria.postgresql.org; Sun, 28 Jul 2019 01:08:58 +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 1hrXgH-0007IR-On for pgsql-hackers@lists.postgresql.org; Sun, 28 Jul 2019 01:08:57 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1hrXgF-0001Jz-6B for pgsql-hackers@lists.postgresql.org; Sun, 28 Jul 2019 01:08:56 +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 x6S18oYV025696; Sat, 27 Jul 2019 21:08:50 -0400 From: Tom Lane To: Andres Freund cc: pgsql-hackers@lists.postgresql.org Subject: Re: Testing LISTEN/NOTIFY more effectively In-reply-to: <20190728005418.j4olh2bsabgbstpg@alap3.anarazel.de> References: <31304.1564246011@sss.pgh.pa.us> <20190727174202.jiwr4jgp3x7gvp22@alap3.anarazel.de> <5720.1564249986@sss.pgh.pa.us> <29162.1564266052@sss.pgh.pa.us> <20190727231826.g34yqkzj53ey46tl@alap3.anarazel.de> <10166.1564270037@sss.pgh.pa.us> <20190727235105.7dgzj5vhaok547ut@alap3.anarazel.de> <20277.1564272133@sss.pgh.pa.us> <20190728005418.j4olh2bsabgbstpg@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Sat, 27 Jul 2019 17:54:18 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <25694.1564276130.1@sss.pgh.pa.us> Date: Sat, 27 Jul 2019 21:08:50 -0400 Message-ID: <25695.1564276130@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Andres Freund writes: > I wonder if there aren't similar dangers around the notify handling. In > your patch we don't print them particularly eagerly. Doesn't that also > open us up to timing concerns? I think probably not, because of the backend-side restrictions on when notify messages will be sent. The corresponding case for the NOTICE bug we just fixed would be if a backend sent a NOTIFY before blocking; but it can't do that internally to a transaction, and anyway the proposed test script isn't doing anything that tricky. I did spend some time thinking about how isolationtester might report notifys that are sent spontaneously (without any "triggering" query) but I didn't feel that that was worth messing with. We'd have to have the program checking all the connections not just the one that's running what it thinks is the currently active step. We might be approaching a time where it's worth scrapping the isolationtester logic and starting over. I'm not volunteering though. regards, tom lane