pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: postgres_fdw: Add functions to discard cached connections.
2+ messages / 2 participants
[nested] [flat]

* pgsql: postgres_fdw: Add functions to discard cached connections.
@ 2021-01-26 06:37 Fujii Masao <fujii@postgresql.org>
  2021-01-26 07:05 ` Re: pgsql: postgres_fdw: Add functions to discard cached connections. Fujii Masao <masao.fujii@oss.nttdata.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Fujii Masao @ 2021-01-26 06:37 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

postgres_fdw: Add functions to discard cached connections.

This commit introduces two new functions postgres_fdw_disconnect()
and postgres_fdw_disconnect_all(). The former function discards
the cached connections to the specified foreign server. The latter discards
all the cached connections. If the connection is used in the current
transaction, it's not closed and a warning message is emitted.

For example, these functions are useful when users want to explicitly
close the foreign server connections that are no longer necessary and
then to prevent them from eating up the foreign servers connections
capacity.

Author: Bharath Rupireddy, tweaked a bit by Fujii Masao
Reviewed-by: Alexey Kondratov, Zhijie Hou, Zhihong Yu, Fujii Masao
Discussion: https://postgr.es/m/CALj2ACVvrp5=AVp2PupEm+nAC8S4buqR3fJMmaCoc7ftT0aD2A@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/411ae64997dc3a42d19eda6721c581841ce2cb82

Modified Files
--------------
contrib/postgres_fdw/connection.c               | 135 ++++++++++++++-
contrib/postgres_fdw/expected/postgres_fdw.out  | 208 +++++++++++++++++++++++-
contrib/postgres_fdw/postgres_fdw--1.0--1.1.sql |  10 ++
contrib/postgres_fdw/sql/postgres_fdw.sql       |  98 ++++++++++-
doc/src/sgml/postgres-fdw.sgml                  |  67 +++++++-
5 files changed, 505 insertions(+), 13 deletions(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: pgsql: postgres_fdw: Add functions to discard cached connections.
  2021-01-26 06:37 pgsql: postgres_fdw: Add functions to discard cached connections. Fujii Masao <fujii@postgresql.org>
@ 2021-01-26 07:05 ` Fujii Masao <masao.fujii@oss.nttdata.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Fujii Masao @ 2021-01-26 07:05 UTC (permalink / raw)
  To: Fujii Masao <fujii@postgresql.org>; pgsql-committers@lists.postgresql.org



On 2021/01/26 15:37, Fujii Masao wrote:
> postgres_fdw: Add functions to discard cached connections.
> 
> This commit introduces two new functions postgres_fdw_disconnect()
> and postgres_fdw_disconnect_all(). The former function discards
> the cached connections to the specified foreign server. The latter discards
> all the cached connections. If the connection is used in the current
> transaction, it's not closed and a warning message is emitted.
> 
> For example, these functions are useful when users want to explicitly
> close the foreign server connections that are no longer necessary and
> then to prevent them from eating up the foreign servers connections
> capacity.


Hmm... this commit causes the buildfarm members to fail.
I'm looking at the issue.

Regards.

-- 
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2021-01-26 07:05 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-01-26 06:37 pgsql: postgres_fdw: Add functions to discard cached connections. Fujii Masao <fujii@postgresql.org>
2021-01-26 07:05 ` Fujii Masao <masao.fujii@oss.nttdata.com>

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