<div dir="ltr"><div>Hi Tatsuo,</div><div>That would be a nice feature. Couple of comments: </div>1. In case a &quot;user dislikes it&quot;. ( as mentioned in the last proposal),  we will ask users to add some dummy function name to disable this functionality? or do we really need <div>an extra flag ? </div><div>2. What would be overhead fetching catalog (memory &amp; network usage), we should document it if it could be significant.</div><div><br></div><div>Regards</div><div>Umar Hayat</div><div>EnterpriseDB: <a href="https://edbpostgres.com/">https://edbpostgres.com</a></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jul 28, 2020 at 1:34 PM Tatsuo Ishii &lt;<a href="mailto:ishii@sraoss.co.jp">ishii@sraoss.co.jp</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">&gt; Hi,<br>
&gt; <br>
&gt; I am thinking about to use the volatile property of functions to get<br>
&gt; ride of black_function_list. If this is possible, admins of Pgpool-II<br>
&gt; do not need to take care of black_function_list, which should make<br>
&gt; admins life a little bit easier.<br>
&gt; <br>
&gt; According to the PostgreSQL manual, non volatile (immutable or stable)<br>
&gt; functions never do writes to database. Only volatile functions can<br>
&gt; write to the database. However there are few functions that do not<br>
&gt; write but have volatile property: random() and timeofday() (there may<br>
&gt; be others but I do not think of for now). So my proposal would be:<br>
&gt; <br>
&gt; 1. If black_function_list is empty, check volatile property of a<br>
&gt; function. If it is volatile, we regard the function will do writes.<br>
&gt; If black_function_list is not empty, keep the current behavior.<br>
&gt; <br>
&gt; 2. Then check white_function_list. If the function is listed in the<br>
&gt; list, we do not regard the function do writes. This will be useful if<br>
&gt; we want to load balance random() or timeofday().<br>
&gt; <br>
&gt; Currently if white_function_list is not empty, only functions listed<br>
&gt; in the list are load balanced. Other functions are regarded as doing<br>
&gt; writes even if they are immutable or stable. So I think my proposal is<br>
&gt; better than current behavior in that more functions have a chance to be<br>
&gt; load balanced.<br>
<br>
Actually almost same proposal has been posted by me:-)<br>
<br>
<a href="https://www.pgpool.net/pipermail/pgpool-hackers/2019-September/003438.html" rel="noreferrer" target="_blank">https://www.pgpool.net/pipermail/pgpool-hackers/2019-September/003438.html</a><br>
([pgpool-hackers: 3438])<br>
<br>
The difference is, in the previous proposal a new config variable to<br>
fall back to existing behavior was proposed. However as I said in<br>
above, we can eliminate the new config variable by checking whether<br>
black_function_list is empty or not.<br>
<br>
Best regards,<br>
--<br>
Tatsuo Ishii<br>
SRA OSS, Inc. Japan<br>
English: <a href="http://www.sraoss.co.jp/index_en.php" rel="noreferrer" target="_blank">http://www.sraoss.co.jp/index_en.php</a><br>
Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer" target="_blank">http://www.sraoss.co.jp</a><br>
_______________________________________________<br>
pgpool-hackers mailing list<br>
<a href="mailto:pgpool-hackers@pgpool.net" target="_blank">pgpool-hackers@pgpool.net</a><br>
<a href="http://www.pgpool.net/mailman/listinfo/pgpool-hackers" rel="noreferrer" target="_blank">http://www.pgpool.net/mailman/listinfo/pgpool-hackers</a><br>
</blockquote></div>