FDW Foreign Table Access: strange LOG message - Mailing list pgsql-general

From Albrecht Dreß
Subject FDW Foreign Table Access: strange LOG message
Date
Msg-id 3DPLMQIC.YU6IFMLY.3PLOWL6W@FQT5M7HS.IFBAANAE.A7GUPCPM
Whole thread Raw
Responses Re: FDW Foreign Table Access: strange LOG message
List pgsql-general
Hi all,

I use Postgres 10.3 on a Debian Stretch system with foreign tables, and noticed 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 (
     […]
) 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 tables:

---8<------------------------------------------------------------------------------------------
import psycopg2
conn = psycopg2.connect(dbname='my_db')
with conn.cursor() as csr:
    csr.execute("SELECT * FROM […] LIMIT 1")
    csr.fetchone()
conn.close()
---8<------------------------------------------------------------------------------------------

When I access a “local” table of my_db in the SELECT statement, there is no LOG message.  However, reading from
ext_tableworks just fine, but the conn.close() statement above triggers the log message 

---8<------------------------------------------------------------------------------------------
[time stamp/pid] user@my_db LOG:  could not receive data from client: Connection reset by peer
---8<------------------------------------------------------------------------------------------

Did I miss something in the setup here?  Or is there any other way to get rid of the message (which fills ~95% of my
logs)?

Thanks in advance,
Albrecht.
Attachment

pgsql-general by date:

Previous
From: Jeremy Finzel
Date:
Subject: Re: found xmin from before relfrozenxid on pg_catalog.pg_authid
Next
From: JotaComm
Date:
Subject: FATAL: semctl(15073290, 4, SETVAL, 0) failed: Invalid argument