Re: narwhal and PGDLLIMPORT

From: Craig Ringer <craig(at)2ndquadrant(dot)com>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: Ashesh Vashi <ashesh(dot)vashi(at)enterprisedb(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: narwhal and PGDLLIMPORT
Date: 2014-02-03 14:23:16
Message-ID: 52EFA654.8010609@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 02/03/2014 06:37 PM, Andres Freund wrote:
> 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.

Fair point. If we're not going to define a proper API, then export
control is not useful. And since there isn't a proper API, nor any on
the cards, _that_ is a reasonable reason to just export all.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2014-02-03 14:24:55 Re: pg_basebackup and pg_stat_tmp directory
Previous Message Andres Freund 2014-02-03 14:16:15 Re: narwhal and PGDLLIMPORT