Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ez97I-0002VT-KI for pgsql-general@arkaria.postgresql.org; Thu, 22 Mar 2018 22:55:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ez97H-0003av-Kd for pgsql-general@arkaria.postgresql.org; Thu, 22 Mar 2018 22:55:27 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ez97H-0003am-Cp for pgsql-general@lists.postgresql.org; Thu, 22 Mar 2018 22:55:27 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ez97D-0004VQ-Ju for pgsql-general@lists.postgresql.org; Thu, 22 Mar 2018 22:55:26 +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 w2MMtCuw004005; Thu, 22 Mar 2018 18:55:13 -0400 From: Tom Lane To: Albrecht =?iso-8859-1?b?RHJl3w==?= cc: Adrian Klaver , pgsql-general@lists.postgresql.org Subject: Re: FDW Foreign Table Access: strange LOG message In-reply-to: References: Comments: In-reply-to Albrecht =?iso-8859-1?b?RHJl3w==?= message dated "Thu, 22 Mar 2018 19:08:19 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <4003.1521759312.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Thu, 22 Mar 2018 18:55:12 -0400 Message-ID: <4004.1521759312@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Albrecht =3D?iso-8859-1?b?RHJl3w=3D=3D?=3D write= s: > No messages are printed whilst the session is open. However, when I qui= t the session by typing =E2=80=9C\q=E2=80=9D /after/ entering the command = above, the LOG message appears. It does not appear when I query tables fr= om my_db exclusively, though, i.e. when I do not access the Foreign Table. It finally occurred to me what is a likely explanation for why you're seeing these messages but I don't when I test postgres_fdw locally: probably, you are encrypting connections to the foreign server with SSL. I can reproduce "could not receive data from client: Connection reset by peer" if I kill -9 a psql client when it's using SSL, but not otherwise. Anyway, it's clearly not very nice that postgres_fdw makes no attempt to do a graceful shutdown of its remote connection. I don't know that this rises to the level of a bug, exactly, but if somebody wanted to send in a patch it'd probably get accepted. regards, tom lane