Re: How to manage shared library lifetime through C functions

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: How to manage shared library lifetime through C functions
Дата
Msg-id 53DF73EF.6070003@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: How to manage shared library lifetime through C functions  (Seref Arikan <serefarikan@gmail.com>)
Ответы Re: How to manage shared library lifetime through C functions
Список pgsql-hackers
On 08/04/2014 06:31 PM, Seref Arikan wrote:
> Thanks a lot Heikki and Albe. Exactly what I was asking for.
> Heikki: the libraries are written in languages that have their own
> runtime and their documentation insists that both init and dispose calls
> are performed when used from C. PG_init() and proc_exit sounds spot on.

That's usually with reference to code that might then load them again,
such as another library. Without specifics it's hard to say.

If these tools depend on the C code terminating cleanly to operate
correctly then they'll also break if the OS crashes, the system loses
power, etc.

Exiting a program without calling cleanup is in many ways just a
particularly friendly kind of crash, and it's often actually much more
efficient than doing cleanup. Why neatly tidy the floor when you're
about to demolish the house? Total waste of time.


-- Craig Ringer                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services



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

Предыдущее
От: Etsuro Fujita
Дата:
Сообщение: Re: Optimization for updating foreign tables in Postgres FDW
Следующее
От: Seref Arikan
Дата:
Сообщение: Re: How to manage shared library lifetime through C functions