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

From Tom Lane
Subject Re: fork() and dynamically loaded c functions....
Date
Msg-id 19594.1281477467@sss.pgh.pa.us
Whole thread Raw
In response to fork() and dynamically loaded c functions....  (Jay Flattery <jaycode@rocketmail.com>)
Responses Re: fork() and dynamically loaded c functions....  (Jay Flattery <jaycode@rocketmail.com>)
List pgsql-general
Jay Flattery <jaycode@rocketmail.com> writes:
> 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

OK...

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

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

            regards, tom lane

pgsql-general by date:

Previous
From: Greg Smith
Date:
Subject: Re: pgtune
Next
From: Eric Ridge
Date:
Subject: Read Committed Transaction Isolation and SELECT ... UNION ... SELECT