<div dir="ltr"><div><span style="font-family:arial,sans-serif;font-size:12.727272033691406px">Hi</span></div><div><span style="font-family:arial,sans-serif;font-size:12.727272033691406px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:12.727272033691406px">Below is the little description of MemoryContexts used by pgpool-II</span></div>
<div><span style="font-family:arial,sans-serif;font-size:12.727272033691406px"><br></span></div><span style="font-family:arial,sans-serif;font-size:12.727272033691406px">ProcessLoopContext: </span><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">
This <span class="">context</span> resets at every main loop iteration of each process<div><br>TopMemoryContext:</div><div>This <span class="">context</span> is same as PostgreSQL&#39;s TopMemoryContext and lives for a life time of process.<br>
<br><span class="">ErrorContext</span>:</div><div>Same as PostgreSQL&#39;s <span class="">ErrorContext</span> and used for <span class="">error</span> processing.<br><br>QueryContext:</div><div>Used by pgpool-II child process and, lives for single query cycle.<br>
<br>Rest of the contexts are inherited from PostgreSQL code and are not used. I think we should remove these</div><div><br></div><div>--Usama</div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jul 4, 2014 at 2:57 PM, Tatsuo Ishii <span dir="ltr">&lt;<a href="mailto:ishii@postgresql.org" target="_blank">ishii@postgresql.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Usama,<br>
<br>
Is there any documentation regarding memory contexts?  I saw these in<br>
mcxt.c but except ProcessLoopContext, there&#39;s no documention about<br>
purposes for these memory context usage.<br>
<br>
MemoryContext TopMemoryContext = NULL;<br>
MemoryContext ErrorContext = NULL;<br>
MemoryContext ProcessLoopContext = NULL; /* This context resets at every main loop iteration of a process */<br>
MemoryContext CacheMemoryContext = NULL;<br>
MemoryContext MessageContext = NULL;<br>
MemoryContext QueryContext = NULL;<br>
MemoryContext CurTransactionContext = NULL;<br>
<br>
I would like to manage memory used in pool_config.l.<br>
--<br>
Tatsuo Ishii<br>
SRA OSS, Inc. Japan<br>
English: <a href="http://www.sraoss.co.jp/index_en.php" target="_blank">http://www.sraoss.co.jp/index_en.php</a><br>
Japanese:<a href="http://www.sraoss.co.jp" target="_blank">http://www.sraoss.co.jp</a><br>
</blockquote></div><br></div>