<div dir="ltr"><div>Hi Tatsuo,</div><div>That would be a nice feature. Couple of comments: </div>1. In case a "user dislikes it". ( 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 & 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 <<a href="mailto:ishii@sraoss.co.jp">ishii@sraoss.co.jp</a>> 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">> Hi,<br>
> <br>
> I am thinking about to use the volatile property of functions to get<br>
> ride of black_function_list. If this is possible, admins of Pgpool-II<br>
> do not need to take care of black_function_list, which should make<br>
> admins life a little bit easier.<br>
> <br>
> According to the PostgreSQL manual, non volatile (immutable or stable)<br>
> functions never do writes to database. Only volatile functions can<br>
> write to the database. However there are few functions that do not<br>
> write but have volatile property: random() and timeofday() (there may<br>
> be others but I do not think of for now). So my proposal would be:<br>
> <br>
> 1. If black_function_list is empty, check volatile property of a<br>
> function. If it is volatile, we regard the function will do writes.<br>
> If black_function_list is not empty, keep the current behavior.<br>
> <br>
> 2. Then check white_function_list. If the function is listed in the<br>
> list, we do not regard the function do writes. This will be useful if<br>
> we want to load balance random() or timeofday().<br>
> <br>
> Currently if white_function_list is not empty, only functions listed<br>
> in the list are load balanced. Other functions are regarded as doing<br>
> writes even if they are immutable or stable. So I think my proposal is<br>
> better than current behavior in that more functions have a chance to be<br>
> 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>