Re: [Proposal] Add foreign-server health checks infrastructure - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: [Proposal] Add foreign-server health checks infrastructure
Date
Msg-id 4ab30d00-d434-4e82-af5d-260609075ff7@oss.nttdata.com
Whole thread Raw
In response to RE: [Proposal] Add foreign-server health checks infrastructure  ("Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>)
Responses RE: [Proposal] Add foreign-server health checks infrastructure
List pgsql-hackers

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



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Flush pgstats file during checkpoints
Next
From: Matthias van de Meent
Date:
Subject: Re: PG17beta2: SMGR: inconsistent type for nblocks