Re: narwhal and PGDLLIMPORT - Mailing list pgsql-hackers

From Andres Freund
Subject Re: narwhal and PGDLLIMPORT
Date
Msg-id 20140203103701.GA1225@awork2.anarazel.de
Whole thread Raw
In response to Re: narwhal and PGDLLIMPORT  (Craig Ringer <craig@2ndquadrant.com>)
Responses Re: narwhal and PGDLLIMPORT  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: narwhal and PGDLLIMPORT  (Craig Ringer <craig@2ndquadrant.com>)
List pgsql-hackers
On 2014-02-03 12:00:40 +0800, Craig Ringer wrote:
> I think it's a good thing personally - we shouldn't be exporting every
> little internal var in the symbol table.
> 
> If we built with -fvisibility=hidden on 'nix there'd be no need to
> complain about commits being on on 'nix then breaking on Windows, 'cos
> the 'nix build would break in the same place. That's all or nothing
> though, there's no "vars hidden, procs exported" option in gcc.

I think that'd be an exercise in futility. We're not talking about a
general purpose library here, where I agree -fvisibility=hidden is a
useful thing, but about the backend. We'd break countless extensions
people have written. Most of those have been authored on *nix.
To make any form of sense we'd need to have a really separate API
layer between internal/external stuff. That doesn't seem likely to
arrive anytime soon, if ever.
I think all that would achieve is that we'd regularly need to backpatch
visibility fixes. And have countless pointless flames about which
variables to expose.

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



pgsql-hackers by date:

Previous
From: Kyotaro HORIGUCHI
Date:
Subject: Re: UNION ALL on partitioned tables won't use indices.
Next
From: Simon Riggs
Date:
Subject: Re: Patch: Show process IDs of processes holding a lock; show relation and tuple infos of a lock to acquire