Re: LOADing functions

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: LOADing functions
Дата
Msg-id 11681.1414793605@sss.pgh.pa.us
обсуждение исходный текст
Ответ на LOADing functions  (Andrew Becker <acbecker@gmail.com>)
Список pgsql-general
Andrew Becker <acbecker@gmail.com> writes:
> Hi - I seem to be unable to reLOAD a shared library within the session
> that I LOADed it.

Nope, you can't, there's no such functionality.

> Hints as to what is going wrong here?  I would certainly expect to be
> able to re-load a shared library while debugging my UDF.

That would require being able to unload it, which is an operation fraught
with hazards.  We used to allow that, but gave it up after observing that
practically every extant extension could be made to crash on unload.
There is for instance no safe way to get out of a function hook --- the
code pattern you may have seen of restoring the prior value is wrong and
unsafe, because it doesn't account for some other extension having plugged
into the hook after you.  You'd leave that other extension kneecapped,
with some of its hook callbacks disabled but others perhaps not.

            regards, tom lane


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

Предыдущее
От: Andrew Becker
Дата:
Сообщение: LOADing functions
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: LOADing functions