From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Lukáš Sobotka <sobotka.luk@gmail.com>
Cc: pgsql-general@postgresql.org
Subject: Re: Foreign table & Connection reset by peer
Date: Sun, 24 Feb 2019 09:46:42 -0800
Message-ID: <650cb78e-f9b4-2b87-ae80-e282bea0cb11@aklaver.com> (raw)
In-Reply-To: <CAJif3kL0Wo-2h-brVEuWr6DCY6dyMSqXugRB0pw2DDZMwknCHw@mail.gmail.com>
References: <CAJif3kJFf_tWg=82jdYVmp-QyZCQTXLjeuT7a-oeU3xW0PLZAg@mail.gmail.com>
<067feae0-b0e6-1ba1-f744-3f294ffae2e2@aklaver.com>
<CAJif3kL0Wo-2h-brVEuWr6DCY6dyMSqXugRB0pw2DDZMwknCHw@mail.gmail.com>
On 2/24/19 2:25 AM, Lukáš Sobotka wrote:
> Thanks for quick answer. I am feeling a little embarrassed that I did
> not find this before... The thread definitely helped me to understand more.
>
> When I execute query with foreign tables, the connection is created
> (according pg_stat_activity). The question is what I should do for
> ending the connection. I can get PID of connection and force to end it
Not sure. In the original thread the OP was calling conn.close() from
inside a Python script and still seeing the message. The only way they
could prevent it was to disable SSL. From what I gather this is down in
the internals of the code and needs a patch to fix. Someone with more
knowledge of this will need to comment further.
> by pg_terminate_backend, but that is not "clean way".
>
> Unfortunately I can not disable SSL encryption as it is mentioned in the
> thread. But it is interesting for me, that the log message (resetting by
> peer) is created only in encrypted connection, because in both way the
> connection stayed defined in pg_stat_activity after query on foreign table.
>
> so 23. 2. 2019 v 22:48 odesílatel Adrian Klaver
> <adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>> napsal:
--
Adrian Klaver
adrian.klaver@aklaver.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: adrian.klaver@aklaver.com, sobotka.luk@gmail.com
Subject: Re: Foreign table & Connection reset by peer
In-Reply-To: <650cb78e-f9b4-2b87-ae80-e282bea0cb11@aklaver.com>
References: <CAJif3kJFf_tWg=82jdYVmp-QyZCQTXLjeuT7a-oeU3xW0PLZAg@mail.gmail.com> <067feae0-b0e6-1ba1-f744-3f294ffae2e2@aklaver.com> <CAJif3kL0Wo-2h-brVEuWr6DCY6dyMSqXugRB0pw2DDZMwknCHw@mail.gmail.com> <650cb78e-f9b4-2b87-ae80-e282bea0cb11@aklaver.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox