[pgpool-hackers: 3747] Re: Using volatile property instead of black_function_list

Tatsuo Ishii ishii at sraoss.co.jp
Tue Jul 28 17:34:50 JST 2020


> Hi,
> 
> I am thinking about to use the volatile property of functions to get
> ride of black_function_list. If this is possible, admins of Pgpool-II
> do not need to take care of black_function_list, which should make
> admins life a little bit easier.
> 
> According to the PostgreSQL manual, non volatile (immutable or stable)
> functions never do writes to database. Only volatile functions can
> write to the database. However there are few functions that do not
> write but have volatile property: random() and timeofday() (there may
> be others but I do not think of for now). So my proposal would be:
> 
> 1. If black_function_list is empty, check volatile property of a
> function. If it is volatile, we regard the function will do writes.
> If black_function_list is not empty, keep the current behavior.
> 
> 2. Then check white_function_list. If the function is listed in the
> list, we do not regard the function do writes. This will be useful if
> we want to load balance random() or timeofday().
> 
> Currently if white_function_list is not empty, only functions listed
> in the list are load balanced. Other functions are regarded as doing
> writes even if they are immutable or stable. So I think my proposal is
> better than current behavior in that more functions have a chance to be
> load balanced.

Actually almost same proposal has been posted by me:-)

https://www.pgpool.net/pipermail/pgpool-hackers/2019-September/003438.html
([pgpool-hackers: 3438])

The difference is, in the previous proposal a new config variable to
fall back to existing behavior was proposed. However as I said in
above, we can eliminate the new config variable by checking whether
black_function_list is empty or not.

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp


More information about the pgpool-hackers mailing list