[pgpool-hackers: 600] Proposal: Allow to use SQL comment without disturbing load balance

Tatsuo Ishii ishii at postgresql.org
Fri Aug 22 09:31:11 JST 2014


Hi pgpool-II hackers,

There's a complain that pgpool-II treats SQL comments (e.g. /* my
comment */) as effectively prevent SELETCs to be load balanced (mantis
#109). This is because pgpool-II does very strict checking whether it
is a SELECT or not by just the query start with 'S' or 's and so on'
(see is_select_query() in pool_process_query.c for more details). This
is a common and fair complain and I would like to fix this for 3.4.

For backward compatibility, I propose to add a new Boolean parameter
"allow_sql_comments". If this is false, any SQL comments will prevent
load balancing as it stands now. If true, any SQL comment is treated
as comment thus load balancing will work. For backward compatibility,
the default for the parameter is false.

Comments and suggestions are welcome.

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