Re: postgres_fdw - cached connection leaks if the associated user mapping/foreign server is dropped

Поиск
Список
Период
Сортировка
От Bharath Rupireddy
Тема Re: postgres_fdw - cached connection leaks if the associated user mapping/foreign server is dropped
Дата
Msg-id CALj2ACV82G1qy6UcratW4HxExiJp0_GuizB6NT31S_VBsMGE-A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: postgres_fdw - cached connection leaks if the associated user mapping/foreign server is dropped  (Zhihong Yu <zyu@yugabyte.com>)
Ответы RE: postgres_fdw - cached connection leaks if the associated user mapping/foreign server is dropped  ("Hou, Zhijie" <houzj.fnst@cn.fujitsu.com>)
Список pgsql-hackers
On Tue, Dec 15, 2020 at 8:25 AM Zhihong Yu <zyu@yugabyte.com> wrote:
> Is the following sequence possible ?
> In pgfdw_inval_callback():
>
>             entry->invalidated = true;
> +           have_invalid_connections = true;
>
> At which time the loop in pgfdw_xact_callback() is already running (but past the above entry).
> Then:
>
> +   /* We are done closing all the invalidated connections so reset. */
> +   have_invalid_connections = false;
>
> At which time, there is still at least one invalid connection but the global flag is off.

It's not possible, as this backend specific code doesn't run in
multiple threads. We can not have pgfdw_inval_callback() and
pgfdw_xact_callback() running at the same time, so we are safe there.

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



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

Предыдущее
От: Kyotaro Horiguchi
Дата:
Сообщение: Re: Add Information during standby recovery conflicts
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Proposed patch for key managment