[pgpool-hackers: 1440] Yet another reset query stuck problem

Tatsuo Ishii ishii at postgresql.org
Thu Mar 3 10:52:14 JST 2016

I have found yet another reset query stuck problem with 3.5 or later.
Currently if we get EOF from frontend connection, we do this:

				 * if backend offers authentication method, frontend could close connection
					(errmsg("unable to read data from frontend"),
                         errdetail("EOF encountered with frontend")));

I found this is not good if frontend sends 'X' (close connection
request) and closes the connection before we send DISCARD and get
resopnse from backend. This hits the code above.

Suppose we have two DB nodes and backend weight of 1 is 0, Pgpool-II
tries to read response from backend 0 and 1 because there's no query
in progress. Since we do not send DISCARD to node 1, pgpool-II hangs
waiting for reply from node 1.

Fix is, to change the error level to FRONTEND_ERROR.

I'm not sure if 3.4 has the same problem, but in theory it is possoble
if pgpool hits the code path above.

I'm going to fix this along with the fix for bug 167 and 168.

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

More information about the pgpool-hackers mailing list