Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l1Nnr-0002Hv-Of for pgsql-hackers@arkaria.postgresql.org; Mon, 18 Jan 2021 06:14:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l1Nnp-00048i-H3 for pgsql-hackers@arkaria.postgresql.org; Mon, 18 Jan 2021 06:14:13 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l1Nnp-00048T-A1 for pgsql-hackers@lists.postgresql.org; Mon, 18 Jan 2021 06:14:13 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l1Nnl-0003sP-Lk for pgsql-hackers@lists.postgresql.org; Mon, 18 Jan 2021 06:14:11 +0000 Received: from hnk.local (p2388216-ipbf1027funabasi.chiba.ocn.ne.jp [118.6.6.216]) by oss.nttdata.com (Postfix) with ESMTPSA id D9FEC62752; Mon, 18 Jan 2021 15:14:05 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.102.3 at oss.nttdata.com Subject: Re: [PATCH] postgres_fdw connection caching - cause remote sessions linger till the local session exit To: Bharath Rupireddy Cc: Zhihong Yu , Alexey Kondratov , "Hou, Zhijie" , PostgreSQL Hackers References: <82debcd7-b236-0fc5-5ff1-5e6b99c59d64@oss.nttdata.com> <55bd82c5-d133-6fbb-f1f4-e25c1509c96e@oss.nttdata.com> From: Fujii Masao Message-ID: <422884a8-c863-a4d4-cebd-562855c29977@oss.nttdata.com> Date: Mon, 18 Jan 2021 15:14:05 +0900 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2021/01/18 13:46, Bharath Rupireddy wrote: > On Mon, Jan 18, 2021 at 9:38 AM Fujii Masao wrote: >>> Please review v11 further. >> >> Thanks for updating the patch! >> >> The patch for postgres_fdw_get_connections() basically looks good to me. >> So at first I'd like to push it. Attached is the patch that I extracted >> postgres_fdw_get_connections() part from 0001 patch and tweaked. >> Thought? > > Thanks. > > We need to create the loopback3 with user mapping public, otherwise > the test might become unstable as shown below. Note that loopback and > loopback2 are not dropped in the test, so no problem with them. > > ALTER SERVER loopback OPTIONS (ADD use_remote_estimate 'off'); > DROP SERVER loopback3 CASCADE; > NOTICE: drop cascades to 2 other objects > -DETAIL: drop cascades to user mapping for postgres on server loopback3 > +DETAIL: drop cascades to user mapping for bharath on server loopback3 > > Attaching v2 patch for postgres_fdw_get_connections. Please have a look. Thanks! You're right. I pushed the v2 patch. > I will post patches for the other function postgres_fdw_disconnect, > GUC and server level option later. Thanks! Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION