Re: [HACKERS] Memory context usage

2009-08-29 Thread Adriano Lange
Tom Lane escreveu: Adriano Lange alange0...@gmail.com writes: 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. The existing places that do that sort of thing do their own counting of how much they've allocated. I

Re: [HACKERS] Memory context usage

2009-08-28 Thread Greg Smith
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

Re: [HACKERS] Memory context usage

2009-08-28 Thread Adriano Lange
On Fri, Aug 28, 2009 at 5:18 AM, Greg Smithgsm...@gregsmith.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

Re: [HACKERS] Memory context usage

2009-08-28 Thread Tom Lane
Adriano Lange alange0...@gmail.com writes: 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. The existing places that do that sort of thing do their own counting of how much they've allocated.

[HACKERS] Memory context usage

2009-08-27 Thread Adriano Lange
Hi, How can I get the used memory of a memory context? Is there some function like: int getMemoryUsage( MemoryContext ) ? I still working in a subplan cache for a query optimizer and I need to know whether a temporary memory context is in certain limits. Thanks Adriano -- Sent via

Re: [HACKERS] Memory context usage

2009-08-27 Thread Tom Lane
Adriano Lange alange0...@gmail.com writes: How can I get the used memory of a memory context? MemoryContextStats() might help. It just dumps the info to stderr though. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make