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 1t9SpP-00AL28-UH for pgsql-bugs@arkaria.postgresql.org; Fri, 08 Nov 2024 17:31:23 +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 1t9SpN-00BW18-0m for pgsql-bugs@arkaria.postgresql.org; Fri, 08 Nov 2024 17:31:21 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t9SpM-00BVwb-FZ for pgsql-bugs@lists.postgresql.org; Fri, 08 Nov 2024 17:31:21 +0000 Received: from mail-oi1-x22a.google.com ([2607:f8b0:4864:20::22a]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1t9SpI-000q6n-CY for pgsql-bugs@lists.postgresql.org; Fri, 08 Nov 2024 17:31:19 +0000 Received: by mail-oi1-x22a.google.com with SMTP id 5614622812f47-3e6048bc23cso1487609b6e.3 for ; Fri, 08 Nov 2024 09:31:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; t=1731087075; x=1731691875; darn=lists.postgresql.org; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=hd2UylrvIiN9UfYiq+1daBg+Nqp0jb8f5gwam0KbZAY=; b=E7j9V+bPhhP0cXcgbaSy0JBL9QQl5pANJwozsXauArzEmrlOvnILd5qdVGOXnWcO79 k75udstX5YSsslbGAqaDv2fAlOCNluX94cEc4VkMQGe0LxXQS9gdTeE9nQWTY93LNxz0 flTfDSLn8VBg++k1iPwPtG3LlEX/x1Kp+jkcg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731087075; x=1731691875; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hd2UylrvIiN9UfYiq+1daBg+Nqp0jb8f5gwam0KbZAY=; b=GlFRAysL7tt/rdPmjUNPZSG3/suLuSP8ZuQTutUhSvv2iKo2jr4c6wTMSdkWZUQKxm 4s00L9Hhe/SBdt8+nShlzcdrrgrbDd2Ozd9hW9bcx15k5tsnsMdBkqG3SJ47tP7JfjVb p7jz/tdGWGsCWKn/jYkLGOWeTd0zq/1/EdRKsnYheplqXpJnNMgg1oyQULyXN89Vx6OB 2LnuKvqJcCKHwYYEeRFO4A9/7ZPBEwF+x/1JRJgsTNHHr18POLuSjJ5QLRlUCdlo/Led tlKk7t8SPYxjktMKmgySaN7QlS0g76ziQ72vFfNFVId0TDRcf1h2SiSv0Txk/rNBec7k WgVA== X-Forwarded-Encrypted: i=1; AJvYcCXj35BA65oFTzUYW2oQXwmmAC43TqiYGht0aL+cxPAtn6XOBblPt3E8YOPa5qHt9ze4Cu4yaDudqwTT@lists.postgresql.org X-Gm-Message-State: AOJu0YxfUgl9P/kS8nzsuyWReL7grtWkdj1QuWXa6RkSAzo2UTs4KLxh K8S8TqreJXbFmWBAKfCzFUiJadn3WwhLPHvHblj0q7NNEY7cWohtiR8aZ9opQQ== X-Google-Smtp-Source: AGHT+IH8fjMxkA+wM6txD8+dIi+YYE663z6Tmmo+gCyeElohB5qVGITeZFEikL5gQd0cP4x8Czenkw== X-Received: by 2002:a05:6870:380d:b0:277:e08a:23a0 with SMTP id 586e51a60fabf-295602fd28cmr3517511fac.41.1731087075319; Fri, 08 Nov 2024 09:31:15 -0800 (PST) Received: from google.com ([2600:1702:a20:5750::48]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-29546d24c3dsm1071513fac.30.2024.11.08.09.31.14 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 Nov 2024 09:31:14 -0800 (PST) Date: Fri, 8 Nov 2024 09:31:12 -0800 From: Noah Misch To: Tom Lane Cc: Francesco Degrassi , pgsql-bugs@lists.postgresql.org Subject: Re: Leader backend hang on IPC/ParallelFinish when LWLock held at parallel query start Message-ID: <20241108173112.c7.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> <3459938.1731007759@sss.pgh.pa.us> <20241107193823.dc.nmisch@google.com> <3694355.1731084396@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3694355.1731084396@sss.pgh.pa.us> User-Agent: Mutt/2.2.12 (2023-09-09) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Nov 08, 2024 at 11:46:36AM -0500, Tom Lane wrote: > Noah Misch writes: > > On Thu, Nov 07, 2024 at 02:29:19PM -0500, Tom Lane wrote: > >> Ah, that could be a way out. Stick an INTERRUPTS_CAN_BE_PROCESSED() > >> call somewhere in there? > > > Exactly. If !INTERRUPTS_CAN_BE_PROCESSED(), proceed as though no workers can > > be launched. > > >> That could even allow us to revert the > >> planner change, which would simplify testing of the executor change. > > > True. > > Here's a proposed patch along that line. I left the test case from > ac04aa84a alone, since it works perfectly well to test this way too. > > We could argue about whether or not to revert the planner change. > But I'd prefer to do so, because as things stand it creates a > hard-to-reason-about source of plan instability. Looks perfect. Thank you.