Re: Mark all GUC variable as PGDLLIMPORT
Peter Geoghegan <pg@bowt.ie>
From: Peter Geoghegan <pg@bowt.ie>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Bruce Momjian <bruce@momjian.us>, Julien Rouhaud <rjuju123@gmail.com>, Michael Paquier <michael@paquier.xyz>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-08-23T18:48:35Z
Lists: pgsql-hackers
On Mon, Aug 23, 2021 at 7:57 AM Robert Haas <robertmhaas@gmail.com> wrote: > In short, +1 from me for the original proposal of marking all GUCs as > PGDLLIMPORT. +1 > And, heck, +1 for marking all the other global variables > that way, too. We're not solving any problem here. We're just annoying > people, mostly people who are loyal community members and steady > contributors to the project. I'm +0.5 on this aspect -- the result might be a lot of verbosity for no possible benefit. I'm not sure how many global variables there are. Hopefully not that many. Maybe making adding new global variables annoying would be a useful disincentive -- sometimes we use global variables when it isn't particularly natural (it's natural with GUCs, but not other things). That might tip the scales, at least for me. Unnecessary use of global variables are why Postgres 13 went through several point releases before I accidentally found out that parallel VACUUM doesn't respect cost limits -- a very simple bug concerning how we propagate (or fail to propagate) state to parallel workers. I bet it would have taken far longer for the bug to be discovered if it wasn't for my Postgres 14 VACUUM refactoring work. -- Peter Geoghegan
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