[pgpool-hackers: 568] Re: Memory contexts

Muhammad Usama m.usama at gmail.com
Fri Jul 4 19:04:18 JST 2014


Hi

Below is the little description of MemoryContexts used by pgpool-II

ProcessLoopContext:
This context resets at every main loop iteration of each process

TopMemoryContext:
This context is same as PostgreSQL's TopMemoryContext and lives for a life
time of process.

ErrorContext:
Same as PostgreSQL's ErrorContext and used for error processing.

QueryContext:
Used by pgpool-II child process and, lives for single query cycle.

Rest of the contexts are inherited from PostgreSQL code and are not used. I
think we should remove these

--Usama


On Fri, Jul 4, 2014 at 2:57 PM, Tatsuo Ishii <ishii at postgresql.org> wrote:

> Hi Usama,
>
> Is there any documentation regarding memory contexts?  I saw these in
> mcxt.c but except ProcessLoopContext, there's no documention about
> purposes for these memory context usage.
>
> MemoryContext TopMemoryContext = NULL;
> MemoryContext ErrorContext = NULL;
> MemoryContext ProcessLoopContext = NULL; /* This context resets at every
> main loop iteration of a process */
> MemoryContext CacheMemoryContext = NULL;
> MemoryContext MessageContext = NULL;
> MemoryContext QueryContext = NULL;
> MemoryContext CurTransactionContext = NULL;
>
> I would like to manage memory used in pool_config.l.
> --
> Tatsuo Ishii
> SRA OSS, Inc. Japan
> English: http://www.sraoss.co.jp/index_en.php
> Japanese:http://www.sraoss.co.jp
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.sraoss.jp/pipermail/pgpool-hackers/attachments/20140704/2e1aaf20/attachment.html>


More information about the pgpool-hackers mailing list