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 1hsWZs-0004gr-PD for pgsql-hackers@arkaria.postgresql.org; Tue, 30 Jul 2019 18:10:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hsWZr-0003qe-Lx for pgsql-hackers@arkaria.postgresql.org; Tue, 30 Jul 2019 18:10:23 +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 1hsWZr-0003pe-A8 for pgsql-hackers@lists.postgresql.org; Tue, 30 Jul 2019 18:10:23 +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 1hsWZp-0000Ae-4V for pgsql-hackers@postgresql.org; Tue, 30 Jul 2019 18:10:22 +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 x6UIADHh028980; Tue, 30 Jul 2019 14:10:13 -0400 From: Tom Lane To: Robert Haas cc: Michael Paquier , Andres Freund , Alvaro Herrera , PostgreSQL Hackers Subject: Re: TopoSort() fix In-reply-to: References: <20190726220538.GA17809@alvherre.pgsql> <20190726234835.xqyfukqhhzdiqoih@alap3.anarazel.de> <17997.1564187056@sss.pgh.pa.us> <20190729015059.GE6959@paquier.xyz> <23797.1564412165@sss.pgh.pa.us> <3243.1564437314@sss.pgh.pa.us> <13215.1564451308@sss.pgh.pa.us> <11847.1564496844@sss.pgh.pa.us> <27546.1564508196@sss.pgh.pa.us> <27870.1564508657@sss.pgh.pa.us> Comments: In-reply-to Robert Haas message dated "Tue, 30 Jul 2019 13:45:42 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <28978.1564510213.1@sss.pgh.pa.us> Date: Tue, 30 Jul 2019 14:10:13 -0400 Message-ID: <28979.1564510213@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Robert Haas writes: > On Tue, Jul 30, 2019 at 1:44 PM Tom Lane wrote: >> Well, there'd be an actual isolation test that they work ;-), if you >> override the marking. Admittedly, one test case does not prove that >> there's no way to crash the system, but that can be said of most >> parts of Postgres. > True. I'm just talking about what we can foresee. Sure. But I think what we can foresee is that if there are any bugs reachable this way, they'd be reachable and need fixing regardless. We've already established that parallel workers can take and release locks that their leader isn't holding. Apparently, they won't take anything stronger than RowExclusiveLock; but even AccessShare is enough to let a process participate in all interesting behaviors of the lock manager, including blocking, being blocked, and being released early by deadlock resolution. And the advisory-lock functions are pretty darn thin wrappers around the lock manager. So I'm finding it hard to see where there's incremental risk, even if a user does intentionally bypass the parallel safety markings. And what we get in return is an easier way to add tests for this area. regards, tom lane