Re: Hacking postgres backend process

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Hacking postgres backend process
Дата
Msg-id 20040504132912.GD2417@dcc.uchile.cl
обсуждение исходный текст
Ответ на Hacking postgres backend process  ("Carl E. McMillin" <carlymac@earthlink.net>)
Ответы Re: Hacking postgres backend process
Список pgsql-hackers
On Wed, Apr 28, 2004 at 08:26:09AM -0700, Carl E. McMillin wrote:

> I posted this subject on General discussion-list but got no takers.  I'll
> restate my query and be as brief as I possible.
>  
> "What are the issues/dangers involved in putting an external
> process-execution call in instance of main postgres-backend thread of
> execution?"

I'm not sure of all the issues it has, but as you probably already know,
a C function has access to anything inside the server process.  This
means it can corrupt private structures, look memory and data bypassing
privileges, etc; and if you get an uncaught SIGSEGV the backend will die
and the postmaster will terminate all running backends.  Basically if
you are in constant fear you are in the right shift of mind to do it ...
check every return code, make sure you don't write unassigned memory,
make sure the function wears its mithril shirt at all times, etc.

-- 
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"If it wasn't for my companion, I believe I'd be having
the time of my life"  (John Dunbar)


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

Предыдущее
От: Fabien COELHO
Дата:
Сообщение: Re: inconsistent owners in newly created databases?
Следующее
От: "scott.marlowe"
Дата:
Сообщение: The features I'm waiting for.