Re: [Proposal] Add foreign-server health checks infrastructure

From: Katsuragi Yuta <katsuragiy(at)oss(dot)nttdata(dot)com>
To: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>
Cc: 'Ted Yu' <yuzhihong(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, vignesh C <vignesh21(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org, Önder Kalacı <onderkalaci(at)gmail(dot)com>, Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>, Shinya11(dot)Kato(at)oss(dot)nttdata(dot)com, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
Subject: Re: [Proposal] Add foreign-server health checks infrastructure
Date: 2023-01-25 08:15:10
Message-ID: 20a2c622cd4d763cf0b09b395a953ccc@oss.nttdata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2023-01-23 14:40, Hayato Kuroda (Fujitsu) wrote:
> Dear Ted,
>
> Thanks for reviewing! PSA new version.
>
>> For v25-0001-Add-PQConnCheck-and-PQCanConnCheck-to-libpq.patch ,
>> `pqConnCheck_internal` only has one caller which is quite short.
>> Can pqConnCheck_internal and PQConnCheck be merged into one func ?
>
> I divided the function for feature expandability. Currently it works
> on linux platform,
> but the limitation should be removed in future and internal function
> will be longer.
> Therefore I want to keep this style.
>
>> +int
>> +PQCanConnCheck(void)
>>
>> It seems the return value should be of bool type.
>
> I slightly changed the returned value like true/false. But IIUC libpq
> functions
> cannot define as "bool" datatype. E.g. PQconnectionNeedsPassword()
> returns true/false,
> but the function is defined as int.
>
> Best Regards,
> Hayato Kuroda
> FUJITSU LIMITED

Thank you for updating the patch!

+/* Check whether the postgres server is still alive or not */
+extern int PQConnCheck(PGconn *conn);
+extern int PQCanConnCheck(void);

Aren't these PQconnCheck and PQcanConnCheck? I think the first letter
following 'PQ' should be lower case.

regards.

--
Katsuragi Yuta
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dmitry Koval 2023-01-25 08:35:24 Re: Operation log for major operations
Previous Message Bharath Rupireddy 2023-01-25 07:57:04 Re: Direct I/O