Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gxxrb-0000g4-AB for pgsql-general@arkaria.postgresql.org; Sun, 24 Feb 2019 17:46:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gxxrZ-0005jJ-Cu for pgsql-general@arkaria.postgresql.org; Sun, 24 Feb 2019 17:46:53 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gxxrY-0005jC-UB for pgsql-general@lists.postgresql.org; Sun, 24 Feb 2019 17:46:53 +0000 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gxxrS-0004xE-0y for pgsql-general@postgresql.org; Sun, 24 Feb 2019 17:46:51 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id AE5E33193; Sun, 24 Feb 2019 12:46:44 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Sun, 24 Feb 2019 12:46:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm2; bh=Z QE3E+e9Zk8Knzhwx2CCtso7KQR23E1vd6p1NCQ6VZ8=; b=CNFJqy2N8fL3hTjiF ZaDGFLNBxX2U+n75ihBm19j+IGonc0/QPpYkPJrpbLqC08ymjZNBc4ErqQjzCTvp 0szY/fgk3zLuKMwHDvUZcKWR8LcDTMBSObLpgoNhhsYUreosA3PmtiuYLbqvpzmt WQd80o6c0vc5gnUOjlp+1jtgrezn+mfrtlyBKrVFHfjwmt5WhUsbKBxBuVPDSZtO V8DzaGypZqVvjYA8AgQdhQiffGbT4MCsRO2jRN+9fC6STkmEjLtZ0EHx23PZRnO/ xnrhES0h+W9HZVV7xaR08JgoUuztT4I3mRezspj1GXB16txtHDOZjD7kE/hw4lNo +mPCw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=ZQE3E+e9Zk8Knzhwx2CCtso7KQR23E1vd6p1NCQ6V Z8=; b=rKHRWULcsU6Z8fMt4+78P7ptxgcN3NOQhdZx+D4+NZlQTjp9GlJ8l/v3Y E74ceOkXeoZDNqu9pcJOmxoTtyfb79WofXYaX68ddGxYWgg8aNMg1lyBFGQzHgQB OnuSJqPKfyz667uQa/gXGW/5uIBbHEhxI1hwncMCRXChGcdJUOpHZSglEirb95Pu C01Al9bTbzmNfW82JW7XPfoLdyuIg473OQveFFDFVZkEHJIgeP5iwNBsgj6yFRl6 TGrTjFTMsxZho6FrGvO/sphQDgCL/SUy+5ArlK2kgrQSNCGFdWRvbumP+Q33zfgD Qow7htNW/gLcsK7cr60czJp9aQXMA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedutddrudeggddutdehucdltddurdegtdelrddttd dmucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfquhht necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefuvfhfhffkffgfgggjtgfgsehtkeertddtfeejnecuhfhrohhmpeetughr ihgrnhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtg homheqnecukfhppeejuddrvdduvddrudehtddrvddtvdenucfrrghrrghmpehmrghilhhf rhhomheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomhenucevlhhush htvghrufhiiigvpedt X-ME-Proxy: Received: from [192.168.1.4] (unknown [71.212.150.202]) by mail.messagingengine.com (Postfix) with ESMTPA id 54000E462B; Sun, 24 Feb 2019 12:46:43 -0500 (EST) Subject: Re: Foreign table & Connection reset by peer To: =?UTF-8?B?THVrw6HFoSBTb2JvdGth?= Cc: pgsql-general@postgresql.org References: <067feae0-b0e6-1ba1-f744-3f294ffae2e2@aklaver.com> From: Adrian Klaver Message-ID: <650cb78e-f9b4-2b87-ae80-e282bea0cb11@aklaver.com> Date: Sun, 24 Feb 2019 09:46:42 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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 > > napsal: -- Adrian Klaver adrian.klaver@aklaver.com