Re: V14 and later build the backend with -lpthread - Mailing list pgsql-hackers

From Tom Lane
Subject Re: V14 and later build the backend with -lpthread
Date
Msg-id 1574775.1661460972@sss.pgh.pa.us
Whole thread Raw
In response to Re: V14 and later build the backend with -lpthread  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Thu, Aug 25, 2022 at 1:41 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> ... On the third hand, poking at backends with ldd shows that at
>> least on Linux, we've been linking the backend with -lpthread for
>> quite some time, back to 9.4 or so.  The new-in-v14 behavior is that
>> it's getting in there on BSD-ish platforms as well.

[ further study shows that it's been pulled in on Linux to get sem_init() ]

>> Should we try to pull that back out, or just cross our fingers and
>> hope there's no real problem?

> Absent some evidence of a real problem, I vote for crossing our
> fingers. It would certainly be a very bad idea to start using pthreads
> willy-nilly in the back end, but the mere presence of the library
> doesn't seem like a particularly severe issue. I might feel
> differently if no such version had been released yet, but it's hard to
> feel like the sky is falling if it's been like this on Linux since
> 9.4.

Well, -lpthread on other platforms might have more or different
side-effects than it does on Linux, so I'm not particularly comforted
by that argument.  I concede though that the lack of complaints about
v14 is comforting.  I'm prepared to do nothing for now; I just wanted
to raise visibility of this point so that if we do come across any
weird pre-vs-post-v14 issues, we think of this as a possible cause.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: V14 and later build the backend with -lpthread
Next
From: Tom Lane
Date:
Subject: Re: V14 and later build the backend with -lpthread