-
Notifications
You must be signed in to change notification settings - Fork 4.1k
sql: extend the memory monitor to ease troubleshooting #9122
Copy link
Copy link
Closed
Labels
C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
Description
Required by @RaduBerinde in #8691 (comment)
It would also be useful to be able to get a "snapshot" of what allocations are outstanding. Ideally we would support a "tracking" mode where we keep track of all accounts (including e.g. caller's file:line where it was created). The tracking mode could be enabled per-monitor by the higher layer (where it may depend on a flag/env var). It should be trivial to identify what account leaked on a failed unit test by just re-running it with that flag.
Such tracking code should ensure that there is no measurable overhead when tracking is disabled.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)