Re: pgsql_fdw, FDW for PostgreSQL server

Поиск
Список
Период
Сортировка
От Hitoshi Harada
Тема Re: pgsql_fdw, FDW for PostgreSQL server
Дата
Msg-id CAP7Qgm=Uz4vBUcSGFLU=kv+1BpUs9GyS=mmJiu73Hxdpw7Yv7g@mail.gmail.com
обсуждение исходный текст
Ответ на pgsql_fdw, FDW for PostgreSQL server  (Shigeru Hanada <shigeru.hanada@gmail.com>)
Ответы Re: pgsql_fdw, FDW for PostgreSQL server
Re: pgsql_fdw, FDW for PostgreSQL server
Re: pgsql_fdw, FDW for PostgreSQL server
Список pgsql-hackers
2011/10/25 Shigeru Hanada <shigeru.hanada@gmail.com>:
>
> Connection management
> =====================
> The pgsql_fdw establishes a new connection when a foreign server is
> accessed first for the local session.  Established connection is shared
> between all foreign scans in the local query, and shared between even
> scans in following queries.  Connections are discarded when the current
> transaction aborts so that unexpected failure won't cause connection
> leak.  This is implemented with resource owner mechanism.
>

I have a doubt here, on sharing connection for each server. What if
there are simultaneous scan on the same plan? Say,

-> Nested Loop -> Foreign Scan to table T1 on server A -> Foreign Scan to table T2 on server A

Okay, you are thinking about Foreign Join, so example above is too
simple. But it is always possible to execute such a query if foreign
scan nodes are separated far, isn't it? As far as I see from your
explanation, scan T1 and scan T2 share the same connection. Now join
node scans one row from left (T1) while asking rows from right (T2)
without fetching all the rows from left. If T2 requests to server A,
the connection's result (of T1) is discarded. Am I understand
correctly?

Regards,
--
Hitoshi Harada


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: So where are we on the open commitfest?
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: So where are we on the open commitfest?