Re: fork() and dynamically loaded c functions....

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jay Flattery <jaycode(at)rocketmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: fork() and dynamically loaded c functions....
Date: 2010-08-10 21:57:47
Message-ID: 19594.1281477467@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Jay Flattery <jaycode(at)rocketmail(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Eric Ridge 2010-08-10 22:24:39 Read Committed Transaction Isolation and SELECT ... UNION ... SELECT
Previous Message Greg Smith 2010-08-10 20:43:31 Re: pgtune