Re: Mark all GUC variable as PGDLLIMPORT

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bruce Momjian <bruce@momjian.us>
Cc: Julien Rouhaud <rjuju123@gmail.com>, Michael Paquier <michael@paquier.xyz>, pgsql-hackers@lists.postgresql.org
Date: 2021-08-23T14:22:51Z
Lists: pgsql-hackers
Bruce Momjian <bruce@momjian.us> writes:
> On Mon, Aug 23, 2021 at 10:15:04AM -0400, Tom Lane wrote:
>> By that argument, *every* globally-visible variable should be marked
>> PGDLLIMPORT.  But the mere fact that two backend .c files need to access

> No, Julien says 99% need only the GUCs, so that is not the argument I am
> making.

That's a claim unbacked by any evidence that I've seen.  More to
the point, we already have a mechanism that extensions can/should
use to read and write GUC settings, and it's not direct access.

			regards, tom lane



Commits

  1. Remove PGDLLIMPORT marker from __pg_log_level

  2. Mark a few 'bbsink' related functions / variables static.

  3. Add some missing PGDLLIMPORT markings

  4. Apply PGDLLIMPORT markings broadly.

  5. Helper script to apply PGDLLIMPORT markings.

  6. Simplify declaring variables exported from libpgcommon and libpgport.