Re: V14 and later build the backend with -lpthread

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: V14 and later build the backend with -lpthread
Date: 2022-08-25 20:56:12
Message-ID: 1574775.1661460972@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Thu, Aug 25, 2022 at 1:41 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2022-08-25 21:04:37 Re: V14 and later build the backend with -lpthread
Previous Message Thomas Munro 2022-08-25 20:51:44 Re: V14 and later build the backend with -lpthread