[pgpool-general: 8369] Re: pgpool failing over on bad queries
Tatsuo Ishii
ishii at sraoss.co.jp
Fri Sep 2 12:54:54 JST 2022
> I'm finding that I have a client sending a bunch of bad queries to pgpool. After a large number of these errors pgpool appears to decide that the primary backend is in a bad state and fails over to another backend. Why is pgpool doing this and how do I prevent it?
Syntax error itself does not trigger failover. There must be other
reason which triggers the failover. To find the cause, I need to
inspect the pgpool log file.
> Do I need to change failover_on_backend_error to off?
No, it's irrelevant.
> I understand that the right answer is to fix the application. However I don't want my pgpool cluster to keep switching backends because someone writes some bad SQL.
>
> The bad SQL results in the following messages showing up in my log:
> 2022-09-01 17:09:52.877: PostgreSQL JDBC Driver pid 2306964: LOG: Unable to parse the query: "select * from ($1) as result" from client 192.1.192.6(51076)
> 2022-09-01 17:09:52.878: PostgreSQL JDBC Driver pid 2306964: LOG: Error message from backend: DB node id: 1 message: "syntax error at or near "$1""
Best reagards,
--
Tatsuo Ishii
SRA OSS LLC
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp
More information about the pgpool-general
mailing list