Re: Fixing parallel make of libpq

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: ilmari(at)ilmari(dot)org (Dagfinn Ilmari Mannsåker )
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Fixing parallel make of libpq
Date: 2020-01-09 14:17:12
Message-ID: 26437.1578579432@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

ilmari(at)ilmari(dot)org (Dagfinn Ilmari =?utf-8?Q?Manns=C3=A5ker?=) writes:
> Michael Paquier <michael(at)paquier(dot)xyz> writes:
>> Hmm. That logically makes sense. Isn't that a side effect of 7143b3e
>> then? Now, FWIW, I am not able to reproduce it here, after trying on
>> two different machines, various parallel job numbers (up to 32), and a
>> couple of dozen attempts. Perhaps somebody else can see the failures?

> It fails reliably for me on Debian Buster, with make 4.2.1-1.2and -j4.

Yeah, it's also reliable for me on Fedora 30:

$ make -s clean
$ make -s -j4 -C src/interfaces/libpq
/usr/bin/ld: cannot find -lpgcommon_shlib
/usr/bin/ld: cannot find -lpgport_shlib
collect2: error: ld returned 1 exit status
make: *** [../../../src/Makefile.shlib:293: libpq.so.5.13] Error 1
make: *** Waiting for unfinished jobs....

On a RHEL6 box, the same test only draws a complaint about
-lpgcommon_shlib, so it does seem like there's some make version
dependency in here. And of course the whole thing is a race condition
anyway, so naturally it's going to be pretty context-sensitive.

My thoughts about the patch:

1) Changing from an "|"-style dependency to a plain dependency seems
like a semantics change. I've never been totally clear on the
difference though. I think Peter introduced our use of the "|" style,
so maybe he can comment.

2) The same coding pattern is used in a bunch of other places, so if
this spot is broken, there probably are a lot of others that need a
similar change. On the other hand, there may not be that many
directories that are likely places to start a parallel build from,
so maybe we don't care elsewhere.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2020-01-09 14:18:45 Re: pgsql: Allow 'sslkey' and 'sslcert' in postgres_fdw user mappings
Previous Message Julien Rouhaud 2020-01-09 13:39:42 Re: Add pg_file_sync() to adminpack