From: | Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com> |
---|---|
To: | Andres Freund <andres(at)anarazel(dot)de> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: memory leak in trigger handling (since PG12) |
Date: | 2023-05-25 14:43:55 |
Message-ID: | 0376ae2d-570e-8837-9e93-8ada1deb2cee@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 5/24/23 22:19, Andres Freund wrote:
>
> ...
>
> Hm - stepping back a bit, why are we doing the work in ExecGetAllUpdatedCols()
> over and over? Unless I am missing something, the result doesn't change
> across rows. And it doesn't look that cheap to compute, leaving aside the
> allocation that bms_union() does.
>
> It's visible in profiles, not as a top entry, but still.
>
> Perhaps the easiest to backpatch fix is to just avoid recomputing the value?
> But perhaps it'd be just as problmeatic, because callers might modify
> ExecGetAllUpdatedCols()'s return value in place...
>
Yes, I think that's a perfectly valid point - I was actually wondering
about that too, but I was focused on fixing this in backbranches so I
left this as a future optimization (assuming it can be cached).
regards
--
Tomas Vondra
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Christoph Berg | 2023-05-25 14:46:41 | Re: testing dist tarballs |
Previous Message | Tomas Vondra | 2023-05-25 14:41:14 | Re: memory leak in trigger handling (since PG12) |