pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: hi@alyssa.is
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15525: Build failures when compiling Postgres with Make parallelization
Date: Tue, 27 Nov 2018 19:11:36 -0500
Message-ID: <31602.1543363896@sss.pgh.pa.us> (raw)
In-Reply-To: <15525-a30da084f17a1faa@postgresql.org>
References: <15525-a30da084f17a1faa@postgresql.org>

=?utf-8?q?PG_Bug_reporting_form?= <noreply@postgresql.org> writes:
> There have been multiple reports to the Nix package manager that compiling
> PostgreSQL on macOS with Make's -j option have resulted in build failures.
> As far as we know, this has only happened on macOS.

This isn't too helpful if you don't mention which macOS version nor what
sort of hardware exactly.  Most PG developers use parallel builds
routinely, so we know that it's not broken in general.

For me, trying 9.6 branch on macOS Mojave (10.14.1) on a 2018 6-core MBP,
"make -j" is unusable because the OS fails to support an indefinite number
of processes: lots of commands fall over with messages like
	clang: error: unable to execute command: posix_spawn failed: Resource temporarily unavailable
This is not a Postgres bug; maybe you could make a case that it's
make's fault, but I'm not sure.  It looks like a lot of the fork
failures happen outside of make's view.

However, if I use a more reasonable parallelism level like -j8,
or even as high as -j25, it goes through fine.  It doesn't look
like there's any net reduction in build time above around -j10,
so I'm not very excited about seeing whether it would fall over
at some level short of what breaks the OS.

Having said that, we did do a round of patches in the v11 development
cycle that addressed some parallel-make hazards.  A lot of said hazards
were new in v11 :-(, but I think that some of them were pre-existing
problems.  So you might find that PG 11 is more resistant to whatever
is going on here.

BTW, are you using the Apple-supplied make, or some other version?
In the past we've had to fight with parallelism bugs in old gmake
versions ...

			regards, tom lane




view thread (14+ messages)  latest in thread

Message-ID: <31602.1543363896@sss.pgh.pa.us>
Permalink:  ../31602.1543363896@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/31602.1543363896@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, hi@alyssa.is, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #15525: Build failures when compiling Postgres with Make parallelization
  In-Reply-To: <31602.1543363896@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox