Re: [PATCH] postgres_fdw connection caching - cause remote sessions linger till the local session exit

From: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
To: Alexey Kondratov <a(dot)kondratov(at)postgrespro(dot)ru>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [PATCH] postgres_fdw connection caching - cause remote sessions linger till the local session exit
Date: 2020-11-23 06:48:42
Message-ID: CALj2ACU0gf_Xf2sAtrCRhvLc-G42UqLGthDfVC9G1jzUpBcQ1w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>
> Here is how I'm making 4 separate patches:
>
> 1. new function and it's documentation.
> 2. GUC and it's documentation.
> 3. server level option and it's documentation.
> 4. test cases for all of the above patches.
>

Hi, I'm attaching the patches here. Note that, though the code changes
for this feature are small, I divided them up as separate patches to
make review easy.

v1-0001-postgres_fdw-function-to-discard-cached-connections.patch
This patch adds a new function that gets defined as part of CREATE
EXTENSION postgres_fdw; postgres_fdw_disconnect() when called with a
foreign server name discards the associated connections with the
server name. When called without any argument, discards all the
existing cached connections.

v1-0002-postgres_fdw-add-keep_connections-GUC-to-not-cache-connections.patch
This patch adds a new GUC postgres_fdw.keep_connections, default being
on, when set to off no remote connections are cached by the local
session.

v1-0003-postgres_fdw-server-level-option-keep_connection.patch
This patch adds a new server level option, keep_connection, default
being on, when set to off, the local session doesn't cache the
connections associated with the foreign server.

v1-0004-postgres_fdw-connection-cache-discard-tests-and-documentation.patch
This patch adds the tests and documentation related to this feature.

Please review the patches.

With Regards,
Bharath Rupireddy.
EnterpriseDB: http://www.enterprisedb.com

Attachment Content-Type Size
v1-0001-postgres_fdw-function-to-discard-cached-connections.patch application/octet-stream 4.9 KB
v1-0002-postgres_fdw-add-keep_connections-GUC-to-not-cache-connections.patch application/octet-stream 3.9 KB
v1-0003-postgres_fdw-server-level-option-keep_connection.patch application/octet-stream 3.5 KB
v1-0004-postgres_fdw-connection-cache-discard-tests-and-documentation.patch application/octet-stream 15.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2020-11-23 07:11:26 Re: bug in pageinspect's "tuple data" feature
Previous Message Amul Sul 2020-11-23 06:36:45 Re: [Patch] ALTER SYSTEM READ ONLY