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 1eyMNO-0006cs-Pa for pgsql-general@arkaria.postgresql.org; Tue, 20 Mar 2018 18:52:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1eyMNN-0002G2-RS for pgsql-general@arkaria.postgresql.org; Tue, 20 Mar 2018 18:52:49 +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.89) (envelope-from ) id 1eyMNN-0002Ft-GO for pgsql-general@lists.postgresql.org; Tue, 20 Mar 2018 18:52:49 +0000 Received: from vsmx009.vodafonemail.xion.oxcs.net ([153.92.174.87]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eyMNJ-0005t5-8C for pgsql-general@lists.postgresql.org; Tue, 20 Mar 2018 18:52:47 +0000 Received: from vsmx001.vodafonemail.xion.oxcs.net (unknown [192.168.75.191]) by mta-5-out.mta.xion.oxcs.net (Postfix) with ESMTP id 83864C05FF for ; Tue, 20 Mar 2018 18:52:38 +0000 (UTC) Received: from deneb.localdomain (unknown [89.0.141.173]) by mta-5-out.mta.xion.oxcs.net (Postfix) with ESMTPA id 59F3F30073E for ; Tue, 20 Mar 2018 18:52:36 +0000 (UTC) Date: Tue, 20 Mar 2018 19:52:29 +0100 From: Albrecht =?iso-8859-1?b?RHJl3w==?= Subject: FDW Foreign Table Access: strange LOG message To: pgsql-general@lists.postgresql.org Message-Id: <3DPLMQIC.YU6IFMLY.3PLOWL6W@FQT5M7HS.IFBAANAE.A7GUPCPM> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA256; protocol="application/pgp-signature"; boundary="=-l8zcHHKnIwfTpeSVAOhO" X-VADE-STATUS: LEGIT List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --=-l8zcHHKnIwfTpeSVAOhO Content-Type: text/plain; charset=UTF-8; DelSp=Yes; Format=Flowed Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi all, I use Postgres 10.3 on a Debian Stretch system with foreign tables, and not= iced strange LOG messages when accessing them. The data base setup is basically ---8<----------------------------------------------------------------------= -------------------- CREATE EXTENSION IF NOT EXISTS postgres_fdw WITH SCHEMA public; CREATE SERVER ext_server FOREIGN DATA WRAPPER postgres_fdw OPTIONS ( dbname 'ext_db', host 'localhost', updatable 'false'); CREATE FOREIGN TABLE public.ext_table ( [=E2=80=A6] ) SERVER ext_server OPTIONS (schema_name 'public', table_name 'some_table',= updatable 'false'); ---8<----------------------------------------------------------------------= -------------------- Now I use the following trivial Python2 (psycopg2) code to access the table= s: ---8<----------------------------------------------------------------------= -------------------- import psycopg2 conn =3D psycopg2.connect(dbname=3D'my_db') with conn.cursor() as csr: csr.execute("SELECT * FROM [=E2=80=A6] LIMIT 1") csr.fetchone() conn.close() ---8<----------------------------------------------------------------------= -------------------- When I access a =E2=80=9Clocal=E2=80=9D table of my_db in the SELECT statem= ent, there is no LOG message. However, reading from ext_table works just f= ine, but the conn.close() statement above triggers the log message ---8<----------------------------------------------------------------------= -------------------- [time stamp/pid] user@my_db LOG: could not receive data from client: Conne= ction reset by peer ---8<----------------------------------------------------------------------= -------------------- Did I miss something in the setup here? Or is there any other way to get r= id of the message (which fills ~95% of my logs)? Thanks in advance, Albrecht.= --=-l8zcHHKnIwfTpeSVAOhO Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAABCAAGBQJasVhtAAoJEEypbw5n59n496kIAIOOS9CA+D40jTI8OHRgUgkr hnW5xtgPATAZfXqZK8MyT+N4pEtsbM1spHg6YuYyYDaBne6g/23Y887n+ZZGOIkA qrOK0qDZJLKo83OvjQN4Ls2PSTIY3TBzdV9SSSshGobtFYXAagbik6Y90AmHMGAA OBqHYVOmJ8Pele0ogHAGQ2tOczLVYDhxRq6Pczric35cd1XT0e2Ya2bH8jbYF7ZG HADH076k7Xwa8S4YwVPPAAAsrsGDf0tPEvyu6R5mjjrtTD+zklPsn7PWUrH3k3DC guuiTqtwh29qQRV5/fRX5qsxL9Evqf6/wqAdEGpvKKCu9VTCkdARXfH7u7f1NhI= =NZqm -----END PGP SIGNATURE----- --=-l8zcHHKnIwfTpeSVAOhO--