Thanks for your reply

>> 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

>What exactly is that child process doing?  It sure sounds like it thinks
>it's a valid backend.

Actually it's not doing anything, as I'm just trying to work it all out - just 
a 

bunch of printfs and waits.
But the library is a PG_MAGIC_MODULE.

I tried killing it with pg_terminate_backend(pid) - but I get WARNING:   PID 
1166738497 is not a PostgreSQL server process. (Interestingly the  child 
pid=28629, which was printed in the line before)

>You can fork something if you like, but it had absolutely better not
>touch any part of shared memory afterwards.

Sure - it is intended to run independently.

Is there an internal pfork() or something similar I should use instead?



      


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to