Re: Add PortalDrop in exec_execute_message

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Yura Sokolov <y(dot)sokolov(at)postgrespro(dot)ru>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Add PortalDrop in exec_execute_message
Date: 2021-05-21 18:23:20
Message-ID: 4160143.1621621400@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Yura Sokolov <y(dot)sokolov(at)postgrespro(dot)ru> 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2021-05-21 18:27:29 Re: compute_query_id and pg_stat_statements
Previous Message Andrew Dunstan 2021-05-21 18:19:13 Re: compute_query_id and pg_stat_statements