Обсуждение: Add a new backend process

Поиск
Список
Период
Сортировка

Add a new backend process

От
Amir Abdollahi
Дата:
<table border="0" cellpadding="0" cellspacing="0"><tr><td style="font: inherit;" valign="top">Hello,<br /><br />I want
toadd a new backend process to postgres, to include my own auditing modules.<br />How can i do that, also how can i
signalit after!<br />Sorry if this is very general question!<br /><br />I didn't find any source to learn these things
inpostgres.<br /><br />thanks in advance<br /><br /><img
src="http://signatures.mylivesignature.com/54488/140/06C6DCFF041A6185736DB1D238014ADC.png"style="border: 0pt none !
important;background: none repeat scroll 0% 0% transparent;" /><br /></td></tr></table><br /> 

Re: Add a new backend process

От
Florian Pflug
Дата:
On Jun 16, 2010, at 8:47 , Amir Abdollahi wrote:
> I want to add a new backend process to postgres, to include my own auditing modules.
> How can i do that, also how can i signal it after!

The existing auxiliary processes (in 8.4) and their entry points are
autovacuum  (autovacuum.c, AutoVacLauncherMain)
bgwriter (bgwriter.c, BackgroundWriterMain)
walwriter (walwriter.c, WalWriterMain)
startup/recovery (xlog.c, StartupProcessMain)

You should probably compare the characteristics of these processes (when are they launched, how do they interface with
thedatabase, ...) to your requirements. Pick the best-matching candidate and start by copying what it does. 

best regards,
Florian Pflug