Re: SQL/MED estimated time of arrival?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: SQL/MED estimated time of arrival?
Дата
Msg-id 19495.1289057369@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: SQL/MED estimated time of arrival?  (Hitoshi Harada <umi.tanuki@gmail.com>)
Список pgsql-hackers
Hitoshi Harada <umi.tanuki@gmail.com> writes:
> And if we really make this async query come true, I suggest designing
> resource (i.e. remote connection) management very carefully. When the
> executor fails in the middle of its execution, it possibly fails to
> release its own resource; close() in ExecutorEnd() will never be
> called. As far as I know files and memory are released automatically
> in the current mechanism, but MED APIs will use their own resources
> other than them.

The way to fix that is for the FDW to hook into the ResourceOwner
mechanism (via RegisterResourceReleaseCallback).  Then it can track
and clean up things it knows about just as "automatically" as anything
else is.

Of course, if you lose your network connection to the remote DB,
you have to assume it will clean up of its own accord.
        regards, tom lane


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

Предыдущее
От: Yeb Havinga
Дата:
Сообщение: Re: Fix for seg picksplit function
Следующее
От: Bruce Momjian
Дата:
Сообщение: PL/pgSQL and shared_preload_libraries