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

Tatsuo Ishii ishii at sraoss.co.jp
Fri Jul 24 18:12:51 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.

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