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 1t98C7-007x15-Bo for pgsql-bugs@arkaria.postgresql.org; Thu, 07 Nov 2024 19:29:26 +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 1t98C4-001del-EH for pgsql-bugs@arkaria.postgresql.org; Thu, 07 Nov 2024 19:29:25 +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 1t98C4-001dec-5V for pgsql-bugs@lists.postgresql.org; Thu, 07 Nov 2024 19:29:24 +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 1t98C0-000ixL-QL for pgsql-bugs@lists.postgresql.org; Thu, 07 Nov 2024 19:29:24 +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 4A7JTJvF3459939; Thu, 7 Nov 2024 14:29:19 -0500 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: <20241107192233.94.nmisch@google.com> References: <20240918030159.2a.nmisch@google.com> <1737570.1726633422@sss.pgh.pa.us> <20240918050434.13.nmisch@google.com> <3441950.1730999841@sss.pgh.pa.us> <20241107192233.94.nmisch@google.com> Comments: In-reply-to Noah Misch message dated "Thu, 07 Nov 2024 11:22:33 -0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3459937.1731007759.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Thu, 07 Nov 2024 14:29:19 -0500 Message-ID: <3459938.1731007759@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Noah Misch writes: > On Thu, Nov 07, 2024 at 12:17:21PM -0500, Tom Lane wrote: >> While working on the release notes, I noticed that nothing further >> got done about this concern. What do you think of adding a test >> somewhere early in executor startup, to the effect of >> = >> if (!INTERRUPTS_CAN_BE_PROCESSED()) >> ereport(ERROR, >> (errmsg("cannot start a query with interrupts disabled")))= ; >> = >> It's definitely a band-aid, but it seems better than leaving >> things at the status quo. > That would fire in queries that don't error or hang today, so I think th= at > would be worse than the status quo. Good point. > This thread's previous commit just forced a serial plan. My concern is that the previous commit forced new plans to be serial, but did nothing about re-use of an existing plan. > The executor > counterpart would look like having the executor do what it does when the= re are > no free worker slots. Ah, that could be a way out. Stick an INTERRUPTS_CAN_BE_PROCESSED() call somewhere in there? That could even allow us to revert the planner change, which would simplify testing of the executor change. regards, tom lane