<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:10pt">Thanks Tatsuo!<br><br>I have setup a Master and Slave configuration and set relcache_expire as 600 in pgpool.conf. Now I do manual testing within 600 seconds. <br>I connect to database through pgpool port 9999. At the psql prompt, I created a table with 3 columns:<br><br>CREATE TABLE phonebook(phone VARCHAR(32), name VARCHAR(32), address VARCHAR(64));<br><br>I inserted proper values and then executed the select query which returns proper values.<br>SELECT * FROM phonebook ORDER BY name;<br><br>Now, I alter the table and rename the column 'name' with 'firstname'<br>ALTER TABLE phonebook RENAME COLUMN name TO firstname;<br><br>Now, the same select query returns me the ERROR "column "name" does not exist".&nbsp; I thought it should return fine because relation cache would not have updated table structure, right? Or am I missing
 something?<br><br><br><div style="font-family: times new roman, new york, times, serif; font-size: 10pt;"> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div dir="ltr"> <font size="2" face="Arial"> <hr size="1">  <b><span style="font-weight:bold;">From:</span></b> Tatsuo Ishii &lt;ishii@postgresql.org&gt;<br> <b><span style="font-weight: bold;">To:</span></b> sandeeptt@yahoo.com <br><b><span style="font-weight: bold;">Cc:</span></b> pgpool-general@pgpool.net <br> <b><span style="font-weight: bold;">Sent:</span></b> Tuesday, February 14, 2012 2:52 PM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [pgpool-general: 221] Re: More information on relcache_expire<br> </font> </div> <br>
&gt; right, that makes sense. Thanks!<br>&gt; <br>&gt; BTW, how do we know that the query result is returned from the cache or not?<br><br>Please look into PostgreSQL log. If you see access to pg_class or so<br>before user's query, that is the accessed from pgpool, thus cache is<br>not used.<br>--<br>Tatsuo Ishii<br>SRA OSS, Inc. Japan<br>English: http://www.sraoss.co.jp/index_en.php<br>Japanese: http://www.sraoss.co.jp<br><br>&gt; ________________________________<br>&gt;&nbsp; From: Tatsuo Ishii &lt;<a ymailto="mailto:ishii@postgresql.org" href="mailto:ishii@postgresql.org">ishii@postgresql.org</a>&gt;<br>&gt; To: <a ymailto="mailto:sandeeptt@yahoo.com" href="mailto:sandeeptt@yahoo.com">sandeeptt@yahoo.com</a> <br>&gt; Cc: <a ymailto="mailto:pgpool-general@pgpool.net" href="mailto:pgpool-general@pgpool.net">pgpool-general@pgpool.net</a> <br>&gt; Sent: Tuesday, February 14, 2012 2:11 PM<br>&gt; Subject: Re: [pgpool-general: 221] Re: More information on
 relcache_expire<br>&gt;&nbsp; <br>&gt;&gt; I mean, let's say I define the value of relcache_expire as "600" seconds. and the TABLE in cache is ALTERED before that. That means my query will produce the wrong result because the relation cache is not yet updated/expired, right?<br>&gt; <br>&gt; Yes.<br>&gt; <br>&gt; On what basis one would define the value of relcache_expire in pgpool.conf?<br>&gt; <br>&gt; I don't think changing table structure so frequently is a real life<br>&gt; usecase. Rather I think it happens during application development:<br>&gt; table structures are not stable.<br>&gt; <br>&gt; If your customer really wants to change table structure every 5<br>&gt; minutes, probably there's something wrong with user's work flow<br>&gt; anyway.<br>&gt; --<br>&gt; Tatsuo Ishii<br>&gt; SRA OSS, Inc. Japan<br>&gt; English: <a href="http://www.sraoss.co.jp/index_en.php" target="_blank">http://www.sraoss.co.jp/index_en.php</a><br>&gt; Japanese: <a
 href="http://www.sraoss.co.jp" target="_blank">http://www.sraoss.co.jp</a><br>&gt; <br>&gt;&gt; ________________________________<br>&gt;&gt;&nbsp; From: Sandeep Thakkar &lt;<a ymailto="mailto:sandeeptt@yahoo.com" href="mailto:sandeeptt@yahoo.com">sandeeptt@yahoo.com</a>&gt;<br>&gt;&gt; To: "<a ymailto="mailto:pgpool-general@pgpool.net" href="mailto:pgpool-general@pgpool.net">pgpool-general@pgpool.net</a>" &lt;<a ymailto="mailto:pgpool-general@pgpool.net" href="mailto:pgpool-general@pgpool.net">pgpool-general@pgpool.net</a>&gt; <br>&gt;&gt; Sent: Monday, February 13, 2012 1:58 PM<br>&gt;&gt; Subject: [pgpool-general: 220] More information on relcache_expire<br>&gt;&gt;&nbsp; <br>&gt;&gt; <br>&gt;&gt; - Add relcache_expire directive to control the expiration of the internal system catalog cache. ALTER TABLE might make these cache values obsoleted and the new directive will make the risk lower(Tatsuo)<br>&gt;&gt; &nbsp;I would like to know how to make use
 of this directive? A test case will help.<br>&gt;&gt; <br>&gt;&gt; Thanks.<br>&gt;&gt; <br>&gt;&gt; <br>&gt;&gt; _______________________________________________<br>&gt;&gt; pgpool-general mailing list<br>&gt;&gt; <a ymailto="mailto:pgpool-general@pgpool.net" href="mailto:pgpool-general@pgpool.net">pgpool-general@pgpool.net</a><br>&gt;&gt; http://www.pgpool.net/mailman/listinfo/pgpool-general<br><br><br> </div> </div>  </div></body></html>