Skip site navigation (1) Skip section navigation (2)

Re: do we EXEC_BACKEND on Mac OS X?

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: do we EXEC_BACKEND on Mac OS X?
Date: 2012-10-03 16:15:35
Message-ID: 20121003161535.GB3470@momjian.us (view raw or flat)
Thread:
Lists: pgsql-hackers
On Wed, Oct 3, 2012 at 01:05:54PM -0300, Alvaro Herrera wrote:
> See the CAVEATS here:
>
> https://developer.apple.com/library/mac/#documentation/Darwin/Referenc
> e/ManPages/man2/fork.2.html
>
> Apparently fork() without exec() isn't all that well supported.
>
> Noticed while perusing http://lwn.net/Articles/518306/

I think this comment is more relevant:

	Ah, OK, I found this

        https://developer.apple.com/library/mac/#documentation/Da...

        It seems that from 10.5 this caveat was added to the official OS
        X documentation. In that light I think it's safest to conclude
        that Apple realised fork() is hard (check out the long list
        of things a current Linux fork does to retain sanity in the
        face of threads, asynchronous I/O, capabilities and other fun
        toys that didn't exist at the dawn of Unix) and decided they
        don't care. It will probably work, but if it doesn't they aren't
        interested in explaining why/ fixing the problem.

        On balance I agree this makes OS X a pretty shoddy Unix, but
        then, I would have been easily persuaded of that anyway.

I am hesitant to avoid fork() on OS/X until someone reports a problem; 
the slowdown would be significant, and I don't think we use enough OS/X
libraries to cause a problem for us, though Bonjour might be a problem.

Anyway, good you asked and we should be aware of possible problems.

-- 
  Bruce Momjian  <bruce(at)momjian(dot)us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +


In response to

pgsql-hackers by date

Next:From: Boszormenyi ZoltanDate: 2012-10-03 16:15:58
Subject: Re: [PATCH] Make pg_basebackup configure and start standby [Review]
Previous:From: Alvaro HerreraDate: 2012-10-03 16:07:38
Subject: Re: CREATE SCHEMA IF NOT EXISTS

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group