Re: FDW Foreign Table Access: strange LOG message

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
Cc: Albrecht Dreß <albrecht(dot)dress(at)arcor(dot)de>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: FDW Foreign Table Access: strange LOG message
Date: 2018-03-20 19:38:56
Message-ID: 30297.1521574736@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> writes:
> On 03/20/2018 11:52 AM, Albrecht Dreß wrote:
>> I use Postgres 10.3 on a Debian Stretch system with foreign tables, and
>> noticed strange LOG messages when accessing them.
>> [time stamp/pid] user(at)my_db LOG:  could not receive data from client:
>> Connection reset by peer

> My suspicion is it has to do with this:
> postgres_fdw establishes a connection to a foreign server during the
> first query that uses a foreign table associated with the foreign
> server. This connection is kept and re-used for subsequent queries in
> the same session.

Perhaps. It's not entirely clear if these complaints are about the
original user session or the sub-session opened by postgres_fdw.
(Albrecht, if you're not sure either, enabling log_connections and
log_disconnections might make it clearer.)

I don't see any such log messages when testing postgres_fdw here,
which is odd; why are my results different?

If these are about the FDW connections, maybe the answer is that
postgres_fdw ought to establish a backend-exit callback in which
it can shut down its connections gracefully. If it's doing that
now, I sure don't see where.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Christoph Berg 2018-03-20 20:19:54 Re: postgresql-10.3 on unbuntu-17.10 - how??
Previous Message Adrian Klaver 2018-03-20 19:24:17 Re: FATAL: semctl(15073290, 4, SETVAL, 0) failed: Invalid argument