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 1sXPQ3-003rSm-Um for pgsql-hackers@arkaria.postgresql.org; Fri, 26 Jul 2024 18:11:55 +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 1sXPP4-00G1dY-4J for pgsql-hackers@arkaria.postgresql.org; Fri, 26 Jul 2024 18:10:54 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sXPP3-00G1dQ-OU for pgsql-hackers@lists.postgresql.org; Fri, 26 Jul 2024 18:10:53 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by makus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sXPP0-001atp-KA for pgsql-hackers@lists.postgresql.org; Fri, 26 Jul 2024 18:10:52 +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 9A77861A53; Sat, 27 Jul 2024 03:10:46 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at oss.nttdata.com Message-ID: Date: Sat, 27 Jul 2024 03:10:41 +0900 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [Proposal] Add foreign-server health checks infrastructure From: Fujii Masao 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 In-Reply-To: <1aa89c91-e3f1-4071-9fa9-14bffa600dd2@oss.nttdata.com> 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/26 22:44, Fujii Masao wrote: > > > On 2024/07/26 17:07, Hayato Kuroda (Fujitsu) wrote: >> Dear Fujii-san, >> >> Just in case - based on the agreement in [1], I updated patches to keep them >> consistent. We can use same pictures for further discussions... > > Thanks for updating the patches! I pushed them. The buildfarm member "hake" reported a failure in the postgres_fdw regression test. diff -U3 /export/home/elmer/c15x/buildroot/HEAD/pgsql.build/contrib/postgres_fdw/expected/postgres_fdw.out /export/home/elmer/c15x/buildroot/HEAD/pgsql.build/contrib/postgres_fdw/results/postgres_fdw.out --- /export/home/elmer/c15x/buildroot/HEAD/pgsql.build/contrib/postgres_fdw/expected/postgres_fdw.out Fri Jul 26 19:16:29 2024 +++ /export/home/elmer/c15x/buildroot/HEAD/pgsql.build/contrib/postgres_fdw/results/postgres_fdw.out Fri Jul 26 19:31:12 2024 @@ -12326,7 +12326,7 @@ FROM postgres_fdw_get_connections(true); case ------ - 1 + 0 (1 row) -- Clean up The regression.diffs shows that pgfdw_conn_check returned 0 even though pgfdw_conn_checkable() returned true. This can happen if the "revents" from poll() indicates something other than POLLRDHUP. I think that "revents" could indicate POLLHUP, POLLERR, or POLLNVAL. Therefore, IMO pgfdw_conn_check() should be updated as follows. I will test this change. - return (input_fd.revents & POLLRDHUP) ? 1 : 0; + return (input_fd.revents & + (POLLRDHUP | POLLHUP | POLLERR | POLLNVAL)) ? 1 : 0; Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION