Re: memory leak in trigger handling (since PG12)

Alexander Pyhalov <a.pyhalov@postgrespro.ru>

From: Alexander Pyhalov <a.pyhalov@postgrespro.ru>
To: Tomas Vondra <tomas.vondra@enterprisedb.com>
Cc: Andres Freund <andres@anarazel.de>, Tom Lane <tgl@sss.pgh.pa.us>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2023-06-23T06:03:24Z
Lists: pgsql-hackers
Tomas Vondra писал 2023-06-22 17:16:
> On 6/22/23 13:46, Tomas Vondra wrote:
>> ...
>> 
>> I haven't tried the reproducer, but I think I see the issue - we store
>> the bitmap as part of the event to be executed later, but the bitmap 
>> is
>> in per-tuple context and gets reset. So I guess we need to copy it 
>> into
>> the proper long-lived context (e.g. AfterTriggerEvents).
>> 
>> I'll get that fixed.
>> 
> 
> Alexander, can you try if this fixes the issue for you?
> 
> 
> regard

Hi.
The patch fixes the problem and looks good to me.
-- 
Best regards,
Alexander Pyhalov,
Postgres Professional



Commits

  1. Fix oversight in handling of modifiedCols since f24523672d

  2. Use per-tuple context in ExecGetAllUpdatedCols

  3. Generated columns