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 1pIoqG-0003a0-PA for pgsql-hackers@arkaria.postgresql.org; Fri, 20 Jan 2023 10:41:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pIoqE-0008Ru-Sg for pgsql-hackers@arkaria.postgresql.org; Fri, 20 Jan 2023 10:41:50 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pIoqE-0008MN-Ip for pgsql-hackers@lists.postgresql.org; Fri, 20 Jan 2023 10:41:50 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pIoqB-0000EU-Ch for pgsql-hackers@lists.postgresql.org; Fri, 20 Jan 2023 10:41:49 +0000 Received: from oss.nttdata.com (localhost [127.0.0.1]) by oss.nttdata.com (Postfix) with ESMTPA id 03FAC61008; Fri, 20 Jan 2023 19:41:41 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.7 at oss.nttdata.com MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 20 Jan 2023 19:41:41 +0900 From: Katsuragi Yuta To: "Hayato Kuroda (Fujitsu)" Cc: 'Ted Yu' , Tom Lane , vignesh C , pgsql-hackers@lists.postgresql.org, =?UTF-8?Q?=C3=96nder_Kalac=C4=B1?= , Fujii Masao , Shinya11.Kato@oss.nttdata.com, Kyotaro Horiguchi Subject: Re: [Proposal] Add foreign-server health checks infrastructure In-Reply-To: References: <20221206182638.w3vrfal4qix4hf2w@awork3.anarazel.de> <204604.1673324688@sss.pgh.pa.us> User-Agent: Roundcube Webmail/1.4.11 Message-ID: X-Sender: katsuragiy@oss.nttdata.com List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2023-01-11 19:04, Hayato Kuroda (Fujitsu) wrote: > Dear hackers, > > I was not sure, but the cfbot could not be accepted the previous > version. > I made the patch again from HEAD(5f6401) without any changes, > so I did not count up the version number. > > Best Regards, > Hayato Kuroda > FUJITSU LIMITED Hi, Thanks for the patch! I read the patch v24. These are my comments. Please check. ## v24-0001-Add-PQConncheck-and-PQCanConncheck-to-libpq.patch + + PQCanConncheckPQCanConncheck + + + Returns the status of the socket. Is this description right? I think this description is for PQConncheck. Something like "Checks whether PQConncheck is available on this platform." seems better. +/* Check whether the postgres server is still alive or not */ +extern int PQConncheck(PGconn *conn); +extern int PQCanConncheck(void); Should the names of these functions be in the form of PQconnCheck? Not PQConncheck (c.f. The section of fe-misc.c in libpq-fe.h). ## v24-0002-postgres_fdw-add-postgres_fdw_verify_connection_.patch +PG_FUNCTION_INFO_V1(postgres_fdw_verify_connection_states); +PG_FUNCTION_INFO_V1(postgres_fdw_verify_connection_states_all); +PG_FUNCTION_INFO_V1(postgres_fdw_can_verify_connection_states); This patch adds new functions to postgres_fdw for PostgreSQL 16. So, I think it is necessary to update the version of postgres_fdw (v1.1 to v1.2). + postgres_fdw_verify_connection_states_all() returns boolean + + + This function checks the status of remote connections that are established + by postgres_fdw from the local session to the foreign + servers. This check is performed by polling the socket and allows It seems better to add a description that states this function checks all the connections. Like the description of postgres_fdw_disconnect_all(). For example, "This function checks the status of 'all the' remote connections..."? regards, -- Katsuragi Yuta Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION