Re: Mark all GUC variable as PGDLLIMPORT
Chapman Flack <chap@anastigmatix.net>
From: Chapman Flack <chap@anastigmatix.net>
To: Robert Haas <robertmhaas@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>
Cc: Julien Rouhaud <rjuju123@gmail.com>, Andres Freund <andres@anarazel.de>,
Michael Paquier <michael@paquier.xyz>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2022-02-14T17:25:36Z
Lists: pgsql-hackers
On 02/14/22 11:43, Robert Haas wrote: > On Mon, Feb 14, 2022 at 10:38 AM Tom Lane <tgl@sss.pgh.pa.us> wrote: >> Robert Haas <robertmhaas@gmail.com> writes: >>> I don't particularly like Chapman's solution, > ... and (3) is an attempt at compromise that is nobody's first choice. Ok, I guess that's )sniffle( a pretty fair way of putting it. > ... (3) put some complex system in place like what Chapman > proposes and get all extension authors to adopt it, By the same token, I don't think it would entail anything like a big flag day for extension authors. Provided no one proposes immediately to /remove/ PGDLLIMPORT from things that now have it, the effect would be more that the next time an extension author comes hat-in-hand asking for a new PGDLLIMPORT because a thing won't build on Windows, the answer can be "here, we have this API you can use for that now." My reading of past discussions on the list suggest that stronger encapsulation and API delineation have advocates in some quarters, so I tried to accommodate that in what I proposed. It does, for example, avoid exposing the 'real' value of a GUC to writing by a buggy or compromised extension. I'll be first to agree what I proposed isn't beautiful, but it might be that a round or two of improvement by somebody smarter than me could lead to something possibly preferable to PGDLLIMPORT-everywhere /when measured against certain objectives/, like encapsulation. So maybe this is in part a discussion about what the weights should be on those various objectives. Regards, -Chap
Commits
-
Remove PGDLLIMPORT marker from __pg_log_level
- 8d3341266508 15.0 landed
-
Mark a few 'bbsink' related functions / variables static.
- b5f44225b833 15.0 landed
-
Add some missing PGDLLIMPORT markings
- 5edeb574285e 15.0 landed
-
Apply PGDLLIMPORT markings broadly.
- 8ec569479fc2 15.0 landed
-
Helper script to apply PGDLLIMPORT markings.
- 80900d469091 15.0 landed
-
Simplify declaring variables exported from libpgcommon and libpgport.
- e04a8059a74c 15.0 cited