| From: | Jay Flattery <jaycode(at)rocketmail(dot)com> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: fork() and dynamically loaded c functions.... |
| Date: | 2010-08-10 23:29:08 |
| Message-ID: | 228368.49208.qm@web120109.mail.ne1.yahoo.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
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?
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2010-08-10 23:49:18 | Re: fork() and dynamically loaded c functions.... |
| Previous Message | Eric Ridge | 2010-08-10 22:58:07 | Re: Read Committed Transaction Isolation and SELECT ... UNION ... SELECT |