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 1lm0we-0006Kk-N1 for pgsql-hackers@arkaria.postgresql.org; Wed, 26 May 2021 21:20:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lm0wd-0005y3-08 for pgsql-hackers@arkaria.postgresql.org; Wed, 26 May 2021 21:20:03 +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 1lm0wb-0005xk-Um for pgsql-hackers@lists.postgresql.org; Wed, 26 May 2021 21:20:01 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lm0wV-00039X-Q2 for pgsql-hackers@lists.postgresql.org; Wed, 26 May 2021 21:20:01 +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 14QLJqUg1664096; Wed, 26 May 2021 17:19:52 -0400 From: Tom Lane To: Alvaro Herrera cc: Yura Sokolov , pgsql-hackers@lists.postgresql.org Subject: Re: Add PortalDrop in exec_execute_message In-reply-to: <202105262059.dnf27qpnccuv@alvherre.pgsql> References: <202105262059.dnf27qpnccuv@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Wed, 26 May 2021 16:59:17 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1664094.1622063992.1@sss.pgh.pa.us> Date: Wed, 26 May 2021 17:19:52 -0400 Message-ID: <1664095.1622063992@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Alvaro Herrera writes: > (I didn't add a Close Portal message to PQsendQueryInternal in pipeline > mode precisely because there is no such message in PQsendQueryGuts. > I think it would be wrong to unconditionally add a Close Portal message > to any of those places.) Yeah, I'm not very comfortable with having libpq take it on itself to do that, either. Looking back at the original complaint, it seems like it'd be fair to wonder why we're still holding a page pin in a supposedly completed executor run. Maybe the right fix is somewhere in the executor scan logic. regards, tom lane