Re: [PATCH] postgres_fdw connection caching - cause remote sessions linger till the local session exit
От | Fujii Masao |
---|---|
Тема | Re: [PATCH] postgres_fdw connection caching - cause remote sessions linger till the local session exit |
Дата | |
Msg-id | 8ef4979b-85e7-c3f2-0653-f8f444f5dcff@oss.nttdata.com обсуждение исходный текст |
Ответ на | Re: [PATCH] postgres_fdw connection caching - cause remote sessions linger till the local session exit (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>) |
Ответы |
Re: [PATCH] postgres_fdw connection caching - cause remote sessions linger till the local session exit
|
Список | pgsql-hackers |
On 2021/01/27 10:06, Bharath Rupireddy wrote: > On Tue, Jan 26, 2021 at 8:38 AM Bharath Rupireddy > <bharath.rupireddyforpostgres@gmail.com> wrote: >> I will post "keep_connections" GUC and "keep_connection" server level >> option patches later. > > Attaching v19 patch set for "keep_connections" GUC and > "keep_connection" server level option. Please review them further. These options are no longer necessary because we now support idle_session_timeout? If we want to disconnect the foreign serverconnections that sit on idle to prevent them from eating up the connection capacities in the foriegn servers, we canjust set idle_session_timeout in those foreign servers. If we want to avoid the cluster-wide setting of idle_session_timeout,we can set that per role. One issue for this approach is that the connection entry remains even afteridle_session_timeout happens. So postgres_fdw_get_connections() returns that connection even though it's actually closedby the timeout. Which is confusing. But which doesn't cause any actual problem, right? When the foreign table is accessedthe next time, that connection entry is dropped, an error is detected, and then new connection will be remade. Sorry I've not read the past long discussion about this feature. If there is the consensus that these options are still necessaryand useful even when we have idle_session_timeout, please correct me. ISTM that it's intuitive (at least for me) to add this kind of option into the foreign server. But I'm not sure if it's goodidea to expose the option as GUC. Also if there is the consensus about this, please correct me. Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION
В списке pgsql-hackers по дате отправления: