Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gRnSH-0005Fe-0l for pgsql-bugs@arkaria.postgresql.org; Wed, 28 Nov 2018 00:11:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gRnSE-0002kv-Pa for pgsql-bugs@arkaria.postgresql.org; Wed, 28 Nov 2018 00:11:46 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gRnSE-0002ko-BP for pgsql-bugs@lists.postgresql.org; Wed, 28 Nov 2018 00:11:46 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gRnSB-0003hR-M5 for pgsql-bugs@lists.postgresql.org; Wed, 28 Nov 2018 00:11:45 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id wAS0BaoW031603; Tue, 27 Nov 2018 19:11:37 -0500 From: Tom Lane To: hi@alyssa.is cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15525: Build failures when compiling Postgres with Make parallelization In-reply-to: <15525-a30da084f17a1faa@postgresql.org> References: <15525-a30da084f17a1faa@postgresql.org> Comments: In-reply-to =?utf-8?q?PG_Bug_reporting_form?= message dated "Tue, 27 Nov 2018 22:26:27 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <31601.1543363896.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 27 Nov 2018 19:11:36 -0500 Message-ID: <31602.1543363896@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk =3D?utf-8?q?PG_Bug_reporting_form?=3D writes: > There have been multiple reports to the Nix package manager that compili= ng > PostgreSQL on macOS with Make's -j option have resulted in build failure= s. > 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 tem= porarily 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