pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Apply PGDLLIMPORT markings to some GUC variables
6+ messages / 4 participants
[nested] [flat]

Commits from this thread:
  2024-08-14 5304fec4d8  Apply PGDLLIMPORT markings to some GUC variables
* Apply PGDLLIMPORT markings to some GUC variables
@ 2024-08-13 14:38 Sofia Kopikova <s.kopikova@postgrespro.ru>
  2024-08-13 19:00 ` Re: Apply PGDLLIMPORT markings to some GUC variables Robert Haas <robertmhaas@gmail.com>
  0 siblings, 1 reply; 6+ messages in thread

From: Sofia Kopikova @ 2024-08-13 14:38 UTC (permalink / raw)
  To: pgsql-hackers

Hi hackers,

I noticed that in commit d3cc5ffe81f6 some GUC variables were moved to
header files. According to the commit message in 8ec569479, all
variables in header files must be marked with PGDLLIMPORT, am I right?

I've made a patch that adds missing PGDLLIMPORTs, please, take a look.

--
Best regards,
Sofia Kopikova
Postgres Professional: http://www.postgrespro.com

Attachments:

0001-Apply-PGDLLIMPORT-markings-to-some-GUC-variables.patch (text/x-patch, 3.6K) download From 603b0433b9538423a324ae980e0a19d7caaf222e Mon Sep 17 00:00:00 2001 From: Sofia Kopikova <s.kopikova@postgrespro.ru> Date: Tue, 13 Aug 2024 16:05:13 +0300 Subject: [PATCH] Apply PGDLLIMPORT markings to some GUC variables According to the commit message in 8ec569479, we must have all variables in header files marked with PGDLLIMPORT. In commit d3cc5ffe81f6 some variables were moved from launch_backend.c file to several header files. This adds PGDLLIMPORT to moved variables. --- src/include/postmaster/syslogger.h | 2 +- src/include/storage/pmsignal.h | 2 +- src/include/storage/proc.h | 4 ++-- src/include/storage/procsignal.h | 2 +- src/include/utils/guc.h | 10 +++++----- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/include/postmaster/syslogger.h b/src/include/postmaster/syslogger.h index b5fc239ba9c..94ea263f2bf 100644 --- a/src/include/postmaster/syslogger.h +++ b/src/include/postmaster/syslogger.h @@ -76,7 +76,7 @@ extern PGDLLIMPORT bool Log_truncate_on_rotation; extern PGDLLIMPORT int Log_file_mode; #ifdef EXEC_BACKEND -extern pg_time_t first_syslogger_file_time; +extern PGDLLIMPORT pg_time_t first_syslogger_file_time; #endif #ifndef WIN32 diff --git a/src/include/storage/pmsignal.h b/src/include/storage/pmsignal.h index 0c9a7e32a8a..87ac91848bc 100644 --- a/src/include/storage/pmsignal.h +++ b/src/include/storage/pmsignal.h @@ -58,7 +58,7 @@ typedef enum typedef struct PMSignalData PMSignalData; #ifdef EXEC_BACKEND -extern volatile PMSignalData *PMSignalState; +extern PGDLLIMPORT volatile PMSignalData *PMSignalState; #endif /* diff --git a/src/include/storage/proc.h b/src/include/storage/proc.h index bbd893a544e..deeb06c9e01 100644 --- a/src/include/storage/proc.h +++ b/src/include/storage/proc.h @@ -454,8 +454,8 @@ extern PGDLLIMPORT int IdleSessionTimeout; extern PGDLLIMPORT bool log_lock_waits; #ifdef EXEC_BACKEND -extern slock_t *ProcStructLock; -extern PGPROC *AuxiliaryProcs; +extern PGDLLIMPORT slock_t *ProcStructLock; +extern PGDLLIMPORT PGPROC *AuxiliaryProcs; #endif diff --git a/src/include/storage/procsignal.h b/src/include/storage/procsignal.h index 2516869465d..f94c11a9a84 100644 --- a/src/include/storage/procsignal.h +++ b/src/include/storage/procsignal.h @@ -77,7 +77,7 @@ extern void procsignal_sigusr1_handler(SIGNAL_ARGS); typedef struct ProcSignalHeader ProcSignalHeader; #ifdef EXEC_BACKEND -extern ProcSignalHeader *ProcSignal; +extern PGDLLIMPORT ProcSignalHeader *ProcSignal; #endif #endif /* PROCSIGNAL_H */ diff --git a/src/include/utils/guc.h b/src/include/utils/guc.h index ba6883ae8fc..0f59de542f3 100644 --- a/src/include/utils/guc.h +++ b/src/include/utils/guc.h @@ -315,11 +315,11 @@ extern PGDLLIMPORT bool optimize_bounded_sort; * that would then require including the definition of struct * config_enum_entry into those header files.) */ -extern const struct config_enum_entry archive_mode_options[]; -extern const struct config_enum_entry dynamic_shared_memory_options[]; -extern const struct config_enum_entry recovery_target_action_options[]; -extern const struct config_enum_entry wal_level_options[]; -extern const struct config_enum_entry wal_sync_method_options[]; +extern PGDLLIMPORT const struct config_enum_entry archive_mode_options[]; +extern PGDLLIMPORT const struct config_enum_entry dynamic_shared_memory_options[]; +extern PGDLLIMPORT const struct config_enum_entry recovery_target_action_options[]; +extern PGDLLIMPORT const struct config_enum_entry wal_level_options[]; +extern PGDLLIMPORT const struct config_enum_entry wal_sync_method_options[]; /* * Functions exported by guc.c -- 2.39.2
^ permalink raw reply [nested|flat] 6+ messages in thread

* Re: Apply PGDLLIMPORT markings to some GUC variables
  2024-08-13 14:38 Apply PGDLLIMPORT markings to some GUC variables Sofia Kopikova <s.kopikova@postgrespro.ru>
@ 2024-08-13 19:00 ` Robert Haas <robertmhaas@gmail.com>
  2024-08-14 09:50   ` Re: Apply PGDLLIMPORT markings to some GUC variables Peter Eisentraut <peter@eisentraut.org>
  2024-08-19 06:18   ` Re: Apply PGDLLIMPORT markings to some GUC variables Michael Paquier <michael@paquier.xyz>
  0 siblings, 2 replies; 6+ messages in thread

From: Robert Haas @ 2024-08-13 19:00 UTC (permalink / raw)
  To: Sofia Kopikova <s.kopikova@postgrespro.ru>; +Cc: pgsql-hackers@postgresql.org, Peter Eisentraut <peter@eisentraut.org>

On Tue, Aug 13, 2024 at 10:38 AM Sofia Kopikova
<s.kopikova@postgrespro.ru> wrote:
> I noticed that in commit d3cc5ffe81f6 some GUC variables were moved to
> header files. According to the commit message in 8ec569479, all
> variables in header files must be marked with PGDLLIMPORT, am I right?
>
> I've made a patch that adds missing PGDLLIMPORTs, please, take a look.

This seems correct to me.

-- 
Robert Haas
EDB: http://www.enterprisedb.com





^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Apply PGDLLIMPORT markings to some GUC variables
  2024-08-13 14:38 Apply PGDLLIMPORT markings to some GUC variables Sofia Kopikova <s.kopikova@postgrespro.ru>
  2024-08-13 19:00 ` Re: Apply PGDLLIMPORT markings to some GUC variables Robert Haas <robertmhaas@gmail.com>
@ 2024-08-14 09:50   ` Peter Eisentraut <peter@eisentraut.org>
  2024-08-14 10:14     ` Re: Apply PGDLLIMPORT markings to some GUC variables Sofia Kopikova <s.kopikova@postgrespro.ru>
  1 sibling, 1 reply; 6+ messages in thread

From: Peter Eisentraut @ 2024-08-14 09:50 UTC (permalink / raw)
  To: Robert Haas <robertmhaas@gmail.com>; Sofia Kopikova <s.kopikova@postgrespro.ru>; +Cc: pgsql-hackers

On 13.08.24 21:00, Robert Haas wrote:
> On Tue, Aug 13, 2024 at 10:38 AM Sofia Kopikova
> <s.kopikova@postgrespro.ru> wrote:
>> I noticed that in commit d3cc5ffe81f6 some GUC variables were moved to
>> header files. According to the commit message in 8ec569479, all
>> variables in header files must be marked with PGDLLIMPORT, am I right?
>>
>> I've made a patch that adds missing PGDLLIMPORTs, please, take a look.
> 
> This seems correct to me.

committed






^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Apply PGDLLIMPORT markings to some GUC variables
  2024-08-13 14:38 Apply PGDLLIMPORT markings to some GUC variables Sofia Kopikova <s.kopikova@postgrespro.ru>
  2024-08-13 19:00 ` Re: Apply PGDLLIMPORT markings to some GUC variables Robert Haas <robertmhaas@gmail.com>
  2024-08-14 09:50   ` Re: Apply PGDLLIMPORT markings to some GUC variables Peter Eisentraut <peter@eisentraut.org>
@ 2024-08-14 10:14     ` Sofia Kopikova <s.kopikova@postgrespro.ru>
  0 siblings, 0 replies; 6+ messages in thread

From: Sofia Kopikova @ 2024-08-14 10:14 UTC (permalink / raw)
  To: Peter Eisentraut <peter@eisentraut.org>; Robert Haas <robertmhaas@gmail.com>; +Cc: pgsql-hackers


On 8/14/24 12:50, Peter Eisentraut wrote:
> On 13.08.24 21:00, Robert Haas wrote:
>> On Tue, Aug 13, 2024 at 10:38 AM Sofia Kopikova
>> <s.kopikova@postgrespro.ru> wrote:
>>> I noticed that in commit d3cc5ffe81f6 some GUC variables were moved to
>>> header files. According to the commit message in 8ec569479, all
>>> variables in header files must be marked with PGDLLIMPORT, am I right?
>>>
>>> I've made a patch that adds missing PGDLLIMPORTs, please, take a look.
>>
>> This seems correct to me.
>
> committed
>
Many thanks for quick review and commit.

-- 
Best regards,
Sofia Kopikova
Postgres Professional: http://www.postgrespro.com







^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Apply PGDLLIMPORT markings to some GUC variables
  2024-08-13 14:38 Apply PGDLLIMPORT markings to some GUC variables Sofia Kopikova <s.kopikova@postgrespro.ru>
  2024-08-13 19:00 ` Re: Apply PGDLLIMPORT markings to some GUC variables Robert Haas <robertmhaas@gmail.com>
@ 2024-08-19 06:18   ` Michael Paquier <michael@paquier.xyz>
  2024-08-19 09:20     ` Re: Apply PGDLLIMPORT markings to some GUC variables Peter Eisentraut <peter@eisentraut.org>
  1 sibling, 1 reply; 6+ messages in thread

From: Michael Paquier @ 2024-08-19 06:18 UTC (permalink / raw)
  To: Robert Haas <robertmhaas@gmail.com>; +Cc: Sofia Kopikova <s.kopikova@postgrespro.ru>; pgsql-hackers@postgresql.org, Peter Eisentraut <peter@eisentraut.org>

On Tue, Aug 13, 2024 at 03:00:00PM -0400, Robert Haas wrote:
> This seems correct to me.

It is not the first time that this happens in recent history.  Would
it be worth automating that?  I would guess a TAP test that takes a
copy of the headers, applies the changes while filtering the few
exceptions, then compares it to the origin in the tree?
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Apply PGDLLIMPORT markings to some GUC variables
  2024-08-13 14:38 Apply PGDLLIMPORT markings to some GUC variables Sofia Kopikova <s.kopikova@postgrespro.ru>
  2024-08-13 19:00 ` Re: Apply PGDLLIMPORT markings to some GUC variables Robert Haas <robertmhaas@gmail.com>
  2024-08-19 06:18   ` Re: Apply PGDLLIMPORT markings to some GUC variables Michael Paquier <michael@paquier.xyz>
@ 2024-08-19 09:20     ` Peter Eisentraut <peter@eisentraut.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Peter Eisentraut @ 2024-08-19 09:20 UTC (permalink / raw)
  To: Michael Paquier <michael@paquier.xyz>; Robert Haas <robertmhaas@gmail.com>; +Cc: Sofia Kopikova <s.kopikova@postgrespro.ru>; pgsql-hackers

On 19.08.24 08:18, Michael Paquier wrote:
> On Tue, Aug 13, 2024 at 03:00:00PM -0400, Robert Haas wrote:
>> This seems correct to me.
> 
> It is not the first time that this happens in recent history.  Would
> it be worth automating that?  I would guess a TAP test that takes a
> copy of the headers, applies the changes while filtering the few
> exceptions, then compares it to the origin in the tree?

Probably worth thinking about, but it would at least require some kind 
of exclude list, because there are exceptions like src/include/common/ 
/logging.h.






^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2024-08-19 09:20 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-08-13 14:38 Apply PGDLLIMPORT markings to some GUC variables Sofia Kopikova <s.kopikova@postgrespro.ru>
2024-08-13 19:00 ` Robert Haas <robertmhaas@gmail.com>
2024-08-14 09:50   ` Peter Eisentraut <peter@eisentraut.org>
2024-08-14 10:14     ` Sofia Kopikova <s.kopikova@postgrespro.ru>
2024-08-19 06:18   ` Michael Paquier <michael@paquier.xyz>
2024-08-19 09:20     ` Peter Eisentraut <peter@eisentraut.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox