Re: [PATCH] Fix leak when a plpgsql exception block catches an error from CALL

From: Aleksander Alekseev <aleksander(at)tigerdata(dot)com>
To: Muzzammil Sarwar <muzzammil(at)umaish(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: [PATCH] Fix leak when a plpgsql exception block catches an error from CALL
Date: 2026-11-19 07:45:54
Message-ID: CAJ7c6TOmk0mvD38tbWxXpkdLxa6OudZUF+YJ5BRTUzUw5LhyMg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Muzzammil,

> A PL/pgSQL procedure, called outside a transaction block, that calls
> another procedure inside an exception block keeps the plan of every
> CALL that fails until it returns, so a loop that catches such failures
> uses memory without limit:
>
> [...]

Thanks for the patch and the detailed description. Looks correct and
complete to me. Changing the CF entry status to RfC.

--
Best regards,
Aleksander Alekseev

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Nazir Bilal Yavuz 2026-11-19 07:57:09 Re: CI slowdown due to PG_TEST_INITDB_EXTRA_OPTS
Previous Message Chao Li 2026-11-19 07:42:09 Re: Fix resource leaks in pg_receivewal on LZ4 close failures