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 1t98Ky-007xu5-1f for pgsql-bugs@arkaria.postgresql.org; Thu, 07 Nov 2024 19:38:35 +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 1t98Kv-001iGQ-DF for pgsql-bugs@arkaria.postgresql.org; Thu, 07 Nov 2024 19:38:33 +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 1t98Kv-001iFr-4o for pgsql-bugs@lists.postgresql.org; Thu, 07 Nov 2024 19:38:33 +0000 Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1t98Ko-000j0m-Qk for pgsql-bugs@lists.postgresql.org; Thu, 07 Nov 2024 19:38:30 +0000 Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-20cceb8d8b4so9419135ad.1 for ; Thu, 07 Nov 2024 11:38:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; t=1731008306; x=1731613106; 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=3bouzsgISTr9gBFd8UH2VzKOxm1aVghruHYxHoqZwW8=; b=RPc9YhWVfl+unldPDgTO1XYPOnU1a0rNtepAW5dbxbCx6oOj96klWVDFWHZSHCqpqR bBuC9ZomegvjWH12dZJEP830Y/FyfIJI5y6dHHoJy242MtDxYtm9J52NBuH4HRD/RS4M 2PjRWrxsnJr3mImspWtxKVHSJvZJXRXoIHlNM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731008306; x=1731613106; 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=3bouzsgISTr9gBFd8UH2VzKOxm1aVghruHYxHoqZwW8=; b=Y/IxD/AV8kVcImJXWgvCT/rMohTMsy7zmAhUmZydHSBSH/2t0KD+mxYuZlEv7NdePZ i2rfIqSfpl33C5ZqYKE6c41TBsQ1JDz4DtK9G3VzOqnT7LdibBvpuDtM1kUmBYcsxx3u WkyWkfejrL9aQkHPzjAWAGJ9E/QRJbU/54zoFEuiv9f9c+f502R45s3tJebAtYQhoZwO mJwQZDJF5PZgYAgAGNvuf/a5yXGVP4sRi3ehavWGXxdRSCVdZ+e3bZ4XnlABPPijbx34 SsltDUQBIG+/lOHchirCY1gKrD7vACkD6yJQ+p2zu1VF7y3HkrWH9HZQ0TX9v4uFn/Kf KUnA== X-Forwarded-Encrypted: i=1; AJvYcCWu5THYulH2posRieDEvRLDQBccC6tiqJRYQpDN7AbNpXiWxSlZRqJ+dPKeEAo5qL4gYwVl8p7N5oG1@lists.postgresql.org X-Gm-Message-State: AOJu0Yw40ZvzkN2wJ+vsq0v8Oz7lBBHxOj59IqsqryBLq4+ZkE2y9LRu vYXoN15bnhTn8z1Ijg+KihaHcTfAWCLDPxSr9j3OGpHUQc65GLySHGpPN/LUyw== X-Google-Smtp-Source: AGHT+IHF6eMEFQfMTPF/cskXn8p88i7YqUl+PHLaDnmM2X/AzF66Vyy+1A57GD+x3asdOiYpdEXvwQ== X-Received: by 2002:a17:903:32c4:b0:20c:c9ac:bd0d with SMTP id d9443c01a7336-2118377eb96mr14275ad.19.1731008305399; Thu, 07 Nov 2024 11:38:25 -0800 (PST) Received: from google.com ([2600:1702:a20:5750::48]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-21177e4148esm15849925ad.125.2024.11.07.11.38.24 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Nov 2024 11:38:25 -0800 (PST) Date: Thu, 7 Nov 2024 11:38:23 -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: <20241107193823.dc.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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3459938.1731007759@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 Thu, Nov 07, 2024 at 02:29:19PM -0500, Tom Lane wrote: > Noah Misch writes: > > 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. I agree. It solved one way of reaching the problem, leaving at least one unsolved. > > The executor > > counterpart would look like having the executor do what it does when there are > > no free worker slots. > > 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.