On Wed, Sep 18, 2024 at 09:42:43AM +0200, Anthonin Bonnefoy wrote:
> Looking at the failure, it seems like the issue was already present
> with \bind, though there was no assertion failure: repeatedly calling
> \bind would allocate new stmtName/bind_params and leak them at the
> start of exec_command_bind.

Indeed.  That's a bad idea to do that in the client.  We'd better
back-patch that.

> I've joined a patch to clean the psql extended state at the start of
> every extended protocol backslash command, freeing the allocated
> variables and resetting the send_mode. Another possible approach would
> be to return an error when there's already an existing state instead
> of overwriting it.

I'll double-check all that tomorrow, but you have looks like it is
going in the right direction.
--
Michael

Attachment: signature.asc
Description: PGP signature

Reply via email to