Re: Mark all GUC variable as PGDLLIMPORT - Mailing list pgsql-hackers

From Chapman Flack
Subject Re: Mark all GUC variable as PGDLLIMPORT
Date
Msg-id 6123B74C.8050103@anastigmatix.net
Whole thread Raw
In response to Mark all GUC variable as PGDLLIMPORT  (Julien Rouhaud <rjuju123@gmail.com>)
Responses Re: Mark all GUC variable as PGDLLIMPORT  (Chapman Flack <chap@anastigmatix.net>)
List pgsql-hackers
On 08/23/21 10:36, Bruce Momjian wrote:

> So the problem is that extensions only _need_ to use that API on
> Windows, so many initially don't, or that the API is too limited?

I think there can be cases where it's too limited, such as when significant
computation or validation is needed between the form of the setting known
to the GUC machinery and the form that would otherwise be available in
the global.

I'm thinking, for instance, of the old example before session_timezone
was PGDLLIMPORTed, and you'd have to GETCONFIGOPTION("timezone") and
repeat the work done by pg_tzset to validate and map the timezone name
through the timezone database, to reconstruct the value that was
otherwise already available in session_timezone.

Maybe those cases aren't very numerous ... and maybe they're distinctive
enough to recognize when creating one ("hmm, I am creating a check or
assign hook that does significant work here, will it be worth exposing
a getter API for the product of the work?").

Regards,
-Chap



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Mark all GUC variable as PGDLLIMPORT
Next
From: Robert Haas
Date:
Subject: Re: Queries that should be canceled will get stuck on secure_write function