From: | Adriano Lange <alange0001(at)gmail(dot)com> |
---|---|
To: | Greg Smith <gsmith(at)gregsmith(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Memory context usage |
Date: | 2009-08-28 11:56:24 |
Message-ID: | 9e2ba6a80908280456m39108dcav35aa073610a5e5aa@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Aug 28, 2009 at 5:18 AM, Greg Smith<gsmith(at)gregsmith(dot)com> wrote:
> On Fri, 28 Aug 2009, Tom Lane wrote:
>
>> MemoryContextStats() might help. It just dumps the info to stderr
>> though.
>
> Which means it ends up in the database log files in the common configuration
> where where the database's stderr is redirected to there. I even script
> running this regularly against stuff I'm suspicious of, using something like
> this passed the PID of the process I want to watch:
>
> #!/bin/bash
> gdb -p $1 <<EOF
> p MemoryContextStats(TopMemoryContext)
> detach
> quit
> EOF
>
> --
> * Greg Smith gsmith(at)gregsmith(dot)com http://www.gregsmith.com Baltimore, MD
>
Is there another way to get it in the source code?
I need to control the size of a memory context on the fly and take
some actions when
the used memory exceeds a defined size.
Thanks
Adriano
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2009-08-28 13:44:02 | Re: 8.5 release timetable, again |
Previous Message | Greg Stark | 2009-08-28 11:32:49 | Re: 8.5 release timetable, again |