Re: memory leak in trigger handling (since PG12)
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Tomas Vondra <tomas.vondra@enterprisedb.com>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2023-05-23T17:28:30Z
Lists: pgsql-hackers
Andres Freund <andres@anarazel.de> writes: > I've wondered about some form of instrumentation to detect such issues > before. Yeah. > Could it help to have a mode where the executor shutdown hook checks how much > memory is allocated in ExecutorState and warns if its too much? It'd be very hard to set a limit for what's "too much", since the amount of stuff created initially will depend on the plan size. In any case I think that the important issue is not how much absolute space, but is there per-row leakage. I wonder if we could do something involving checking for continued growth after the first retrieved tuple, or something like that. > Random aside: I've been wondering whether it'd be worth introducing an > in-place representation of Bitmap (e.g. if the low bit is set, the low 63 bits > are in-place, if unset, it's a pointer). Why? Unlike Lists, those things are already a single palloc chunk. regards, tom lane
Commits
-
Fix oversight in handling of modifiedCols since f24523672d
- 984c23f6f592 13.12 landed
- 260dbf19a5b4 14.9 landed
- 7ae4e786892f 15.4 landed
- 9cf85093b559 16.0 landed
- ce5aaea8cd32 17.0 landed
-
Use per-tuple context in ExecGetAllUpdatedCols
- f24523672de9 16.0 landed
- 54e1b8587234 12.16 landed
- c504aa857071 13.12 landed
- 7f528e96c501 14.9 landed
- ee87f8b63aee 15.4 landed
-
Generated columns
- fc22b6623b6b 12.0 cited