On 2021/01/27 10:06, Bharath Rupireddy wrote:
On Tue, Jan 26, 2021 at 8:38 AM Bharath Rupireddy
<bharath.rupireddyforpostg...@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 server connections
that sit on idle to prevent them from eating up the connection capacities in
the foriegn servers, we can just 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 after idle_session_timeout happens. So
postgres_fdw_get_connections() returns that connection even though it's
actually closed by the timeout. Which is confusing. But which doesn't cause any
actual problem, right? When the foreign table is accessed the 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 necessary and 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 good idea 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