pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Fujii Masao <fujii@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: postgres_fdw: Add option to control whether to keep connections
Date: Fri, 02 Apr 2021 10:46:48 +0000
Message-ID: <E1lSHKC-0001P4-Tn@gemulon.postgresql.org> (raw)

postgres_fdw: Add option to control whether to keep connections open.

This commit adds a new option keep_connections that controls
whether postgres_fdw keeps the connections to the foreign server open
so that the subsequent queries can re-use them. This option can only be
specified for a foreign server. The default is on. If set to off,
all connections to the foreign server will be discarded
at the end of transaction. Closed connections will be re-established
when they are necessary by future queries using a foreign table.

This option is useful, for example, when users want to prevent
the connections from eating up the foreign servers connections
capacity.

Author: Bharath Rupireddy
Reviewed-by: Alexey Kondratov, Vignesh C, Fujii Masao
Discussion: https://postgr.es/m/CALj2ACVvrp5=AVp2PupEm+nAC8S4buqR3fJMmaCoc7ftT0aD2A@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/b1be3074ac719ce8073fba35d4c8b52fb4ddd0c3

Modified Files
--------------
contrib/postgres_fdw/connection.c              | 33 ++++++++++++++++++++---
contrib/postgres_fdw/expected/postgres_fdw.out | 23 +++++++++++++++-
contrib/postgres_fdw/option.c                  |  4 ++-
contrib/postgres_fdw/sql/postgres_fdw.sql      | 13 +++++++++
doc/src/sgml/postgres-fdw.sgml                 | 37 +++++++++++++++++++++++---
5 files changed, 101 insertions(+), 9 deletions(-)



Message-ID: <E1lSHKC-0001P4-Tn@gemulon.postgresql.org>
Permalink:  ../E1lSHKC-0001P4-Tn@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1lSHKC-0001P4-Tn@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: fujii@postgresql.org
  Subject: Re: pgsql: postgres_fdw: Add option to control whether to keep connections
  In-Reply-To: <E1lSHKC-0001P4-Tn@gemulon.postgresql.org>
  References: <E1lSHKC-0001P4-Tn@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox