Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1llxW6-0006i4-RX for pgsql-bugs@arkaria.postgresql.org; Wed, 26 May 2021 17:40:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1llxW5-0003vh-D9 for pgsql-bugs@arkaria.postgresql.org; Wed, 26 May 2021 17:40:25 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1llxW5-0003vE-6Q for pgsql-bugs@lists.postgresql.org; Wed, 26 May 2021 17:40:25 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1llxW3-0001Ql-4N for pgsql-bugs@lists.postgresql.org; Wed, 26 May 2021 17:40:24 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 321C75C0363; Wed, 26 May 2021 13:40:21 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Wed, 26 May 2021 13:40:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=61mDSTIhlnCX0hPvp5jWWqfvmrAXHGXPNM35s9mYqus=; b=NzV4NPXq QsgWPB6pZQjTWV8vtGPHUmJVmPmwSn54k5V1VaWjIhXRrlkfzNjDQG1M5667TWyf BKjfAqlmadEyvATMbpAnwKrjfwuECHY+I8isqwy2xho5iJaC6o8vV76yXZUF+TrM 8ZdexkoE3W547cMzvoBepxpcZDIsIz6/EfHjhkSHyMoYTWYuZtiFomnvBDONilFr bybRgvVcxFpjLj6vmjCaRFvPnpN2uLMqCMff2Mu1D2c+nLwbpe/ZYnGf0kIaSKu2 UziDzQM5gGSzoKtrRgRZtRKM4pudxv9Km9ALUrx44Yd0pvIPmmhYkG/cvqLOmn1b 3Fq7pEP04lnj5Q== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdekfedguddujecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepfffhvffukfggtggugfgjfgesth ekredttderudenucfhrhhomheptehlvhgrrhhoucfjvghrrhgvrhgruceorghlvhhhvghr rhgvsegrlhhvhhdrnhhoqdhiphdrohhrgheqnecuggftrfgrthhtvghrnhepveeukedtgf evtdeiveeljeevjeevfeelkeetvdfhheeivddvgfeiudegjedvfeelnecuffhomhgrihhn pehgihhthhhusgdrtghomhenucfkphepudeltddrleehrdduledrleehnecuvehluhhsth gvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlvhhhvghrrhgvsegr lhhvhhdrnhhoqdhiphdrohhrgh X-ME-Proxy: Received: from perhan.alvh.no-ip.org (unknown [190.95.19.95]) by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 26 May 2021 13:40:20 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 9C7C32A0A8B; Wed, 26 May 2021 13:40:17 -0400 (-04) Date: Wed, 26 May 2021 13:40:17 -0400 From: Alvaro Herrera To: Tom Lane Cc: rekgrpth@gmail.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17035: assert after commit Message-ID: <20210526174017.GA11909@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1453294.1622037151@sss.pgh.pa.us> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2021-May-26, Tom Lane wrote: > PG Bug reporting form writes: > > after this commit > > https://github.com/postgres/postgres/commit/d18ee6f92d9a22b4fae57f515797b2196bf385c7 > > I got assert > > TRAP: FailedAssertion("portal != NULL", File: "pquery.c", Line: 1758) > > in my plugin > > https://github.com/RekGRpth/pg_task > > I'm inclined to think that means you were doing something you > should not have been doing. But without any details it's > hard to say. Hmm, see for example [1] which is doing SPI_prepare_my() [2] and then SPI_execute_plan_my() ... Does the SPI interface really require that you create an ActivePortal in the SPI-calling code? This looks a bit suspicious to me ... [1] https://github.com/RekGRpth/pg_task/blob/master/work.c#L703 [2] https://github.com/RekGRpth/pg_task/blob/master/spi.c -- Álvaro Herrera Valdivia, Chile