Re: Using ProcSignal to get memory context stats from a running backend
От | Craig Ringer |
---|---|
Тема | Re: Using ProcSignal to get memory context stats from a running backend |
Дата | |
Msg-id | CAMsr+YG3KSH9RCDe0ifFbxjEo6s4m95mJXfXo4v9Cm=bMXDvRw@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Using ProcSignal to get memory context stats from a runningbackend (Andres Freund <andres@anarazel.de>) |
Ответы |
Re: Using ProcSignal to get memory context stats from a running backend
|
Список | pgsql-hackers |
On 20 December 2017 at 02:35, Andres Freund <andres@anarazel.de> wrote:
> Yeah. But please don't mess with MemoryContextStats per se ---
> I dunno about you guys but "call MemoryContextStats(TopMemoryContext)"
> is kinda wired into my gdb reflexes. I think what'd make sense
> is a new function "MemoryContextStatsTo(context, function_pointer)".
> It's okay to redefine the APIs of the per-context-type functions
> these would call, though, because nobody calls those functions directly.
We already have MemoryContextStatsDetail() - it seems to make sense to
expand that API and leave MemoryContextStats() alone. I don't think
there's a need for a third variant?
Cool, can do.
I'll have to expose a typedef for the printf-wrapper callback in memnodes.h and add it to the stats method, which I thought would be more likely to get complaints than the global hook. I'm actually happier to do it with a passed callback.
Will revise when I get a chance in the next couple of days.
В списке pgsql-hackers по дате отправления: