Re: [HACKERS] fork()-safety, thread-safety - Mailing list pgsql-hackers

From Andres Freund
Subject Re: [HACKERS] fork()-safety, thread-safety
Date
Msg-id 20171005223441.cwjtedpuwjmhivhn@alap3.anarazel.de
Whole thread Raw
In response to Re: [HACKERS] fork()-safety, thread-safety  (Nico Williams <nico@cryptonector.com>)
Responses Re: [HACKERS] fork()-safety, thread-safety
Re: [HACKERS] fork()-safety, thread-safety
List pgsql-hackers
Hi,

On 2017-10-05 17:31:07 -0500, Nico Williams wrote:
> > >    vfork() is widely demonized, but it's actually quite superior
> > >    (performance-wise) to fork() when all you want to do is exec-or-exit
> > >    since no page copying (COW or otherwise) needs be done when using
> > >    vfork().
> > 
> > Not on linux, at least not as of a year or two back.
> 
> glibc has it.  Other Linux C libraries might also; I've not checked them
> all.

It has it, but it's not more efficient.


> > I do think it'd be good to move more towards threads, but not at all for
> > the reasons mentioned here.
> 
> You don't think eliminating a large difference between handling of WIN32
> vs. POSIX is a good reason?

I seems like you'd not really get a much reduced set of differences,
just a *different* set of differences. After investing time.

Greetings,

Andres Freund


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

pgsql-hackers by date:

Previous
From: Nico Williams
Date:
Subject: Re: [HACKERS] fork()-safety, thread-safety
Next
From: Nico Williams
Date:
Subject: Re: [HACKERS] fork()-safety, thread-safety