Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sqnVQ-00Cseg-RL for pgsql-bugs@arkaria.postgresql.org; Wed, 18 Sep 2024 05:45:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sqnVQ-0042vE-ED for pgsql-bugs@arkaria.postgresql.org; Wed, 18 Sep 2024 05:45:36 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sqnVQ-0042v6-5n for pgsql-bugs@lists.postgresql.org; Wed, 18 Sep 2024 05:45:36 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sqnVM-001lZG-GY for pgsql-bugs@lists.postgresql.org; Wed, 18 Sep 2024 05:45:35 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 48I5jVYr1748004; Wed, 18 Sep 2024 01:45:31 -0400 From: Tom Lane To: Noah Misch cc: Francesco Degrassi , pgsql-bugs@lists.postgresql.org Subject: Re: Leader backend hang on IPC/ParallelFinish when LWLock held at parallel query start In-reply-to: <20240918053026.79.nmisch@google.com> References: <20240918030159.2a.nmisch@google.com> <1737570.1726633422@sss.pgh.pa.us> <20240918050434.13.nmisch@google.com> <1744648.1726636728@sss.pgh.pa.us> <20240918053026.79.nmisch@google.com> Comments: In-reply-to Noah Misch message dated "Tue, 17 Sep 2024 22:30:26 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1748002.1726638331.1@sss.pgh.pa.us> Date: Wed, 18 Sep 2024 01:45:31 -0400 Message-ID: <1748003.1726638331@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Noah Misch writes: > What if we just ignored the plancache when uninterruptible? The new planner > check would then suffice. Only if you believe that parallel-query is the only problem, which is something I seriously doubt. I fear that the committed patch is just a band-aid over one symptom of the general problem that we can't permit arbitrary operations to be invoked from a btree comparison function. It's late here so I'm not sufficiently awake to think of examples, but I'm sure there are some. However ... clearly a maliciously-coded btree support function can do arbitrarily bad stuff. We restrict creation of opclasses to superusers for exactly that reason. If our ambitions are only to prevent support functions from *accidentally* causing problems, is disabling parallel query enough? I'm still pretty uncomfortable about it, but it's less obviously insufficient than in the general case. regards, tom lane