Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sZZcH-001uXO-H2 for pgsql-hackers@arkaria.postgresql.org; Thu, 01 Aug 2024 17:29:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sZZcF-00CGHi-Lh for pgsql-hackers@arkaria.postgresql.org; Thu, 01 Aug 2024 17:29:27 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sZZcF-00CGHZ-Bn for pgsql-hackers@lists.postgresql.org; Thu, 01 Aug 2024 17:29:27 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sZZcC-002dkK-7D for pgsql-hackers@lists.postgresql.org; Thu, 01 Aug 2024 17:29:26 +0000 Received: from [192.168.11.4] (p3707098-ipxg13201funabasi.chiba.ocn.ne.jp [114.165.120.98]) by oss.nttdata.com (Postfix) with ESMTPSA id 8208F608BE; Fri, 2 Aug 2024 02:29:18 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at oss.nttdata.com Message-ID: <4ab30d00-d434-4e82-af5d-260609075ff7@oss.nttdata.com> Date: Fri, 2 Aug 2024 02:29:17 +0900 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [Proposal] Add foreign-server health checks infrastructure To: "Hayato Kuroda (Fujitsu)" Cc: 'Katsuragi Yuta' , 'vignesh C' , 'Ted Yu' , 'Tom Lane' , "'pgsql-hackers@lists.postgresql.org'" , =?UTF-8?B?J8OWbmRlciBLYWxhY8SxJw==?= , "'Shinya11.Kato@oss.nttdata.com'" , 'Kyotaro Horiguchi' , 'Shubham Khanna' References: <613adbf9-c86e-41dc-ab97-27dc4e7281c7@oss.nttdata.com> <768032ee-fb57-494b-b674-1ccb65b6f969@oss.nttdata.com> <1aa89c91-e3f1-4071-9fa9-14bffa600dd2@oss.nttdata.com> Content-Language: en-US From: Fujii Masao In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2024/07/29 12:58, Hayato Kuroda (Fujitsu) wrote: > Dear Fujii-san, > >>> IIUC, the patch which adds user_name attribute to get_connection() can be >> discussed >>> in later stage, is it right? >> >> No, let's work on the patch at this stage :) > > OK, here is a rebased patch. Thanks for updating the patch! > - Changed the name of new API from `GetUserMappingFromOid` to `GetUserMappingByOid` > to keep the name consistent with others. If we expose this function as an FDW helper function, it should return a complete UserMapping object, including umoptions. However, if postgres_fdw_get_connections() is the only user of this function, I'm not inclined to expose it as an FDW helper. Instead, we can either get the user ID by user mapping OID directly in connection.c using SearchSysCache(), or add the user ID to ConnCacheEntry and use it in postgres_fdw_get_connections(). Thought? Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION