Re: PGDLLEXPORTing all GUCs?

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: PGDLLEXPORTing all GUCs?
Дата
Msg-id 20140507150449.GF13397@awork2.anarazel.de
обсуждение исходный текст
Ответ на Re: PGDLLEXPORTing all GUCs?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: PGDLLEXPORTing all GUCs?
Список pgsql-hackers
On 2014-05-07 10:29:36 -0400, Tom Lane wrote:
> Andres Freund <andres@2ndquadrant.com> writes:
> > On 2014-05-07 09:35:06 -0400, Tom Lane wrote:
> >> Craig Ringer <craig@2ndquadrant.com> writes:
> >>> Is there any reason _not_ to PGDLLEXPORT all GUCs, other than cosmetic
> >>> concerns?
> 
> >> That seems morally equivalent to "is there a reason not to make every
> >> static variable global?".
> 
> > I think what Craig actually tries to propose is to mark all GUCs
> > currently exported in headers PGDLLIMPORT.
> 
> There are few if any GUCs that aren't exposed in headers, just so that
> guc.c can communicate with the owning modules.  That doesn't mean that
> we want everybody in the world messing with them.
> 
> To my mind, we PGDLLEXPORT some variable only after deciding that yeah,
> we're okay with having third-party modules touching that.  Craig's
> proposal is to remove human judgement from that process.

It's just levelling the planefield between platforms. If I had an idea
how I'd still like to just PGDDLIMPORT *all* 'export'ed variables on
windows.
The problem is that there's lot of variables which aren't exported and
which we'll only discover after the release. Just look at what
e.g. postgres_fdw needed. It's not particularly unlikely that others
fdws need some of those as well. But they can't change the release at
the same time.

If we want to declare variables off limits to extension/external code we
need a solution that works on !windows as well.

Greetings,

Andres Freund

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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: David G Johnston
Дата:
Сообщение: Re: PGDLLEXPORTing all GUCs?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: PGDLLEXPORTing all GUCs?