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 1lk9nx-0007z1-JM for pgsql-hackers@arkaria.postgresql.org; Fri, 21 May 2021 18:23:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lk9nw-0003Hn-IX for pgsql-hackers@arkaria.postgresql.org; Fri, 21 May 2021 18:23:24 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lk9nw-0003Hf-Ac for pgsql-hackers@lists.postgresql.org; Fri, 21 May 2021 18:23:24 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lk9nu-0005Hm-BL for pgsql-hackers@lists.postgresql.org; Fri, 21 May 2021 18:23:23 +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 14LINKD54160144; Fri, 21 May 2021 14:23:20 -0400 From: Tom Lane To: Yura Sokolov cc: pgsql-hackers@lists.postgresql.org Subject: Re: Add PortalDrop in exec_execute_message In-reply-to: <4aa370cb91ecf2f9885d98b80ad1109c@postgrespro.ru> References: <4aa370cb91ecf2f9885d98b80ad1109c@postgrespro.ru> Comments: In-reply-to Yura Sokolov message dated "Wed, 19 May 2021 19:18:27 +0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <4160142.1621621400.1@sss.pgh.pa.us> Date: Fri, 21 May 2021 14:23:20 -0400 Message-ID: <4160143.1621621400@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Yura Sokolov writes: > I propose to add PortalDrop at the 'if (completed)' branch of > exec_execute_message. This violates our wire protocol specification, which specifically says If successfully created, a named portal object lasts till the end of the current transaction, unless explicitly destroyed. An unnamed portal is destroyed at the end of the transaction, or as soon as the next Bind statement specifying the unnamed portal as destination is issued. (Note that a simple Query message also destroys the unnamed portal.) I'm inclined to think that your complaint would be better handled by having the client send a portal-close command, if it's not going to do something else immediately. regards, tom lane