[pgpool-hackers: 4193] Re: [pgpool-general: 8391] Re: pgpool failing over on bad queries

Tatsuo Ishii ishii at sraoss.co.jp
Wed Sep 14 10:25:16 JST 2022


Unfortunately the original reporter cannot test the patch because he
does not build pgpool from source code.

BTW, libpq's handling for this case
(pgtls_read:src/interfaces/libpql/fe-secure-openssl.c) looks similar
to my patch (see attached patch). So I will commit my patch to the
master branch and see what build farm says.

		case SSL_ERROR_ZERO_RETURN:

			/*
			 * Per OpenSSL documentation, this error code is only returned for
			 * a clean connection closure, so we should not report it as a
			 * server crash.
			 */
			appendPQExpBufferStr(&conn->errorMessage,
								 libpq_gettext("SSL connection has been closed unexpectedly\n"));
			result_errno = ECONNRESET;
			n = -1;
			break;

Best reagards,
--
Tatsuo Ishii
SRA OSS LLC
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp

From: Tatsuo Ishii <ishii at sraoss.co.jp>
Subject: [pgpool-general: 8391] Re: pgpool failing over on bad queries
Date: Tue, 13 Sep 2022 11:31:36 +0900 (JST)
Message-ID: <20220913.113136.1522926426978223001.t-ishii at sranhm.sra.co.jp>

>> I noticed that this error message showed up on the mailing list back in 2012
>> https://www.pgpool.net/pipermail/pgpool-general/2012-July/000776.html
>> Perhaps the patch there will shed some light on this issue?
> 
> Actually the patch has been already in. I guess we need more. From
> OpenSSL docs:
> https://www.openssl.org/docs/man1.1.1/man3/SSL_get_error.html
> 
> My guess is you hit the case "SSL_ERROR_ZERO_RETURN". Attached is a
> patch trying to not trigger failover in this case. Can you please try
> it out?
> 
> Best reagards,
> --
> Tatsuo Ishii
> SRA OSS LLC
> English: http://www.sraoss.co.jp/index_en/
> Japanese:http://www.sraoss.co.jp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ssl.patch
Type: text/x-patch
Size: 1144 bytes
Desc: not available
URL: <http://www.pgpool.net/pipermail/pgpool-hackers/attachments/20220914/0369cde1/attachment.bin>


More information about the pgpool-hackers mailing list