Re: Mark all GUC variable as PGDLLIMPORT

From: Craig Ringer <craig(dot)ringer(at)enterprisedb(dot)com>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Chapman Flack <chap(at)anastigmatix(dot)net>, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, Julien Rouhaud <rjuju123(at)gmail(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Michael Paquier <michael(at)paquier(dot)xyz>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Mark all GUC variable as PGDLLIMPORT
Date: 2021-08-27 09:35:08
Message-ID: CAGRY4nyPaxsgeOgP5s0R1Jo7Px8=UCRT_Mw-DAGVqkMsnyxAfw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 25 Aug 2021 at 22:36, Magnus Hagander <magnus(at)hagander(dot)net> wrote:

> On Wed, Aug 25, 2021 at 4:06 PM Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> >
> > On Tue, Aug 24, 2021 at 5:06 PM Chapman Flack <chap(at)anastigmatix(dot)net>
> wrote:
> > > The thing is, I think I have somewhere a list of all the threads on
> this
> > > topic that I've read through since the first time I had to come with
> my own
> > > hat in hand asking for a PGDLLIMPORT on something, years ago now, and
> > > I don't think I have ever seen one where it was as uncontroversial
> > > as you suggest.
> >
> > It does tend to be controversial, but I think that's basically only
> > because Tom Lane has reservations about it. I think if Tom dropped his
> > opposition to this, nobody else would really care. And I think that
> > would be a good thing for the project.
>
>
> I have only one consideration about it, and that's a technical one :)
>
> Does this in some way have an effect on the size of the binary and/or
> the time it takes to load it?
>

On *nix, no.

On Windows, very, very minimally.

We *should* be looking into making private symbols we can't make
non-static have hidden visibility at link time, i.e. be DSO-private. This
can have a huge impact on link-time optimisation and inlining.

But doing so is quite orthogonal to the matter of fixing a linkage issue on
Windows. By making select symbols hidden we'd be *reducing* the exposed set
of functions and data symbols in a disciplined and progressive way on all
platforms. Useful but different.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2021-08-27 09:36:14 Re: Mark all GUC variable as PGDLLIMPORT
Previous Message Craig Ringer 2021-08-27 09:32:21 Re: Mark all GUC variable as PGDLLIMPORT