[pgpool-hackers: 2850] Read query load balancing behaviors

Tatsuo Ishii ishii at sraoss.co.jp
Tue Jul 3 16:18:43 JST 2018


Today while reading a bug report from a user, I found interesting load
balancing behaviors. For some reasons I don't know, he set followings
in the reset_query_list.

reset_query_list = 'ABORT; RESET ALL; DEALLOCATE ALL; CLOSE ALL; UNLISTEN *; SELECT pg_advisory_unlock_all(); DISCARD PLANS; DISCARD TEMP;'

I really don't know why he did not use "DISCARD ALL" instead. Anyway
while testing the reset_query_list, I found some interesting things:

1) SELECT pg_advisory_unlock_all() is sent to standby node because
pg_advisory_unlock_all() is not in the black_function_list.

2) "CLOSE ALL" was not sent to standby because Pgpool-II believes that
this command should be sent to primary only.

3) "UNLISTEN *" was not sent to standby because Pgpool-II believes
that this command should be sent to primary only.

For #1, users should register the function in the black_function_list.

For #2 and #3, I think they are ok, since DECLARE and LISTEN command
are only sent to primary node.

After all the behavior was sane but I just felt interesting.

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