Skip to content

sql: extend the memory monitor to ease troubleshooting #9122

@knz

Description

@knz

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions