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 1sXDG9-002SJX-NB for pgsql-hackers@arkaria.postgresql.org; Fri, 26 Jul 2024 05:12:53 +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 1sXDG6-005XKw-KH for pgsql-hackers@arkaria.postgresql.org; Fri, 26 Jul 2024 05:12:50 +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 1sXDCy-005SJm-1K for pgsql-hackers@lists.postgresql.org; Fri, 26 Jul 2024 05:09:36 +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 1sXDCu-001VvQ-U8 for pgsql-hackers@lists.postgresql.org; Fri, 26 Jul 2024 05:09:35 +0000 Received: from [192.168.11.3] (p3655005-ipxg13201funabasi.chiba.ocn.ne.jp [114.145.228.5]) by oss.nttdata.com (Postfix) with ESMTPSA id 235566137E; Fri, 26 Jul 2024 14:09:27 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at oss.nttdata.com Message-ID: <768032ee-fb57-494b-b674-1ccb65b6f969@oss.nttdata.com> Date: Fri, 26 Jul 2024 14:09:26 +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> Content-Language: en-US From: Fujii Masao In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2024/07/26 12:15, Hayato Kuroda (Fujitsu) wrote: > Agreed to add the table. I ran a proofreading tool, and it said below points. > You can revise if they are acceptable. Yes, I'm okay with these changes. Thanks for the review! >> I’ve also made several code improvements, for example adding a typedef for >> pgfdwVersion to simplify its usage, and updated typedefs.list. >> >> +enum pgfdwVersion >> +{ >> + PGFDW_V1_0 = 0, >> + PGFDW_V1_2, >> +} pgfdwVersion; > > It was intentionally not added, because while developing pg_createsubscriber, > I got a comment that local-use data have not have to be typedef'd [1]: I didn't know about the rule regarding local-use enums without typedef, as there are examples like pgssVersion and pgssStoreKind in pg_stat_statements.c. However, I guess that keeping typedefs.list small is better. So, I'm fine with removing the typedef from that enum definition and updating typedefs.list accordingly. > ``` > +Datum > +postgres_fdw_get_connections_1_2(PG_FUNCTION_ARGS) > +{ > + postgres_fdw_get_connections_internal(fcinfo, PGFDW_V1_2); > + > + return (Datum) 0; > +} > ``` > > I know they have a same meaning, but can you clarify why (Datun) 0 > is returned instead of PG_RETURN_VOID()? You're right. I made the change for readability, as similar functions in pg_stat_statements are implemented that way. However, it's not essential. I'm okay with reverting it. Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION