Re: [COMMITTERS] pgsql: Add port/strnlen support to libpq and ecpgMakefiles. - Mailing list pgsql-committers

From Andres Freund
Subject Re: [COMMITTERS] pgsql: Add port/strnlen support to libpq and ecpgMakefiles.
Date
Msg-id 20171011161218.xnnedpo47qa2voi6@alap3.anarazel.de
Whole thread Raw
In response to Re: [COMMITTERS] pgsql: Add port/strnlen support to libpq and ecpg Makefiles.  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [COMMITTERS] pgsql: Add port/strnlen support to libpq and ecpg Makefiles.  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-committers
Hi,

On 2017-10-11 11:58:58 -0400, Tom Lane wrote:
> Andres Freund <andres@anarazel.de> writes:
> > Phew. This is a bit a sad state of affairs. The separate libpq logic for
> > getting pgport is presumably because of possibly different threading
> > flags and then because of the appropriate compiler/linker flags for a
> > shared library?
> 
> I don't see why threading would matter, but building with -fPIC or
> not is definitely an issue.

-pthread changes some "memory model" type assumptions by the compiler
too IIRC, not just linker stage things. In a non-threaded environment
the compiler is kinda free to invent phantom stores and such. It's
unlikely to matter for just pgbench, but ...


> I agree the PITA factor of the current approach keeps increasing.
> It sounds a bit silly to build libpgport three ways, but maybe
> we should just do that.

We already kinda are, just by copying things around ;)


> Or conceivably we should just build the FE version of libpgport.a
> with -fPIC and not worry about whether that loses some efficiency
> for client programs.  A lot of distros are effectively forcing
> that, or even -fPIE, anyway.

Hm.

Greetings,

Andres Freund


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers

pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [COMMITTERS] pgsql: Add port/strnlen support to libpq and ecpg Makefiles.
Next
From: Tom Lane
Date:
Subject: Re: [COMMITTERS] pgsql: Add port/strnlen support to libpq and ecpg Makefiles.