Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aWXEL-0001Ph-6x for pgsql-bugs@arkaria.postgresql.org; Thu, 18 Feb 2016 22:39:25 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aWXEK-00018d-KW for pgsql-bugs@arkaria.postgresql.org; Thu, 18 Feb 2016 22:39:24 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aWXDh-0008A8-2T for pgsql-bugs@postgresql.org; Thu, 18 Feb 2016 22:38:45 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aWXDe-0000gr-H5 for pgsql-bugs@postgresql.org; Thu, 18 Feb 2016 22:38:43 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u1IMcbPF028956; Thu, 18 Feb 2016 17:38:37 -0500 From: Tom Lane To: Dave Vitek cc: Peter Geoghegan , pgsql-bugs Subject: Re: BUG #12799: libpq - SSL pqsecure_read() doesn't clean openssl error queue before reading In-reply-to: <56C646AF.5010805@grammatech.com> References: <20150224030956.2529.83279@wrigleys.postgresql.org> <54EDD30D.5050107@vmware.com> <319431910.43023.1425002429817.JavaMail.zimbra@4linux.com.br> <54F37769.3090406@iki.fi> <56C64197.6060408@grammatech.com> <56C646AF.5010805@grammatech.com> Comments: In-reply-to Dave Vitek message dated "Thu, 18 Feb 2016 17:33:19 -0500" Date: Thu, 18 Feb 2016 17:38:37 -0500 Message-ID: <28955.1455835117@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Dave Vitek writes: > Maintainers: Peter's patch is better than mine, at least for the front > end side. I also adjusted be-secure-openssl.c, which perhaps is not > necessary, but then again it's hard to be sure. It might be worth doing > a patch for be-secure-openssl.c in the spirit of what Peter did for the > frontend (sorry, not volunteering :). +1 for changing both sides. I'm fairly sure that you could provoke problems of this ilk in the backend too, for example if client connection is using SSL and we also establish an outgoing SSL connection using postgres_fdw or dblink. BTW, do we have a reproducible test case? regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs