RE: FDW connections

Поиск
Список
Период
Сортировка
От Hou, Zhijie
Тема RE: FDW connections
Дата
Msg-id bcc96d952b1448d2af62a0609f832bb6@G08CNEXMBPEKD05.g08.fujitsu.local
обсуждение исходный текст
Ответ на Re: FDW connections  (Laurenz Albe <laurenz.albe@cybertec.at>)
Ответы Re: FDW connections
Список pgsql-general
> > If I have made a query on a foreign table (using postgres_fdw),  it
> > establishes a connection automatically. Is there any way to
> > disconnect that fdw connection without disconnecting the session  that
> > instigated it?
> 
> No.
> 
> From PostgreSQL v14 on, there is the "idle_session_timeout" that you could
> set on the server to close such sessions.  postgresql_fdw will silently
> re-establish such broken connections.  You could set this parameter in the
> foreign server definition.
> 
> But this is a strange request: why would you want to close such connections
> before the database session ends?
> 

Hi

There are two new functions being reviewed called:

postgres_fdw_disconnect()
postgres_fdw_disconnect_all()

These function may solve your problem,
If you are interested in that, you can take a look at [1].

The functions have not been committed yet, it may can be used in PG14.

[1] https://www.postgresql.org/message-id/CALj2ACVcpU%3DwB7G%3DzT8msVHvPs0-y0BbviupiT%2Bf3--bGYaOMA%40mail.gmail.com


Best regards,
houzj



 




В списке pgsql-general по дате отправления:

Предыдущее
От: Laurenz Albe
Дата:
Сообщение: Re: FDW connections
Следующее
От: Benedict Holland
Дата:
Сообщение: Re: Copy & Re-copy of DB