Re: do we EXEC_BACKEND on Mac OS X? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: do we EXEC_BACKEND on Mac OS X?
Date
Msg-id 10986.1349282497@sss.pgh.pa.us
Whole thread Raw
In response to Re: do we EXEC_BACKEND on Mac OS X?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: do we EXEC_BACKEND on Mac OS X?  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
I wrote:
> Alvaro Herrera <alvherre@2ndquadrant.com> writes:
>> Noticed while perusing
>> http://lwn.net/Articles/518306/

> I'm afraid Brian was just looking for an excuse to dump on Apple.  We
> have a lot of years of Postgres experience showing that fork() works
> fine on OS X.

BTW, I think the commenter at the bottom of the thread puts his finger
on the core of the real problem:

> I'd wager most libraries are not fork safe, including such libraries
> as SQLite as mentioned in the SQLite FAQ. Libraries that talk to the
> outside world contain much state that is not safe to share.

To bring that closer to home, suppose you have a program with an open
database connection in libpq, and you fork(), and then parent and child
both try to use the connection.  How well would that work?  Is it the
fault of fork()?

I think Apple is just pointing out that their framework libraries have
similar issues.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: do we EXEC_BACKEND on Mac OS X?
Next
From: Bruce Momjian
Date:
Subject: Re: do we EXEC_BACKEND on Mac OS X?