fork() and dynamically loaded c functions.... - Mailing list pgsql-general

From Jay Flattery
Subject fork() and dynamically loaded c functions....
Date
Msg-id 722420.36413.qm@web120110.mail.ne1.yahoo.com
Whole thread Raw
Responses Re: fork() and dynamically loaded c functions....
List pgsql-general
Hi there,

I have some functions written in C that are dynamically loaded. I persist some
state between function calls, initialised by _PG_init. This works fine

I now fork() a process in _PG_Init() (both processes interact), but when I
shutdown postgre I get: LOG:  failed to find proc 0x1331110 in ProcArray
Basically the child process stays alive after postgre exists (as verified by ps
-A)

I was thinking that I could use  _PG_fini for the cleanup, but the manual says
that it "will only be called during an unload of the file, not during process
termination."

Is there any way to either a) insert some cleanup code when the server shuts
down; or b) instruct postgres to kill the child process?

Thanks!






pgsql-general by date:

Previous
From: Jacqui Caren-home
Date:
Subject: Re: MySQL versus Postgres
Next
From: Vibhor Kumar
Date:
Subject: Re: pgtune