pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Anton Voloshin <a.voloshin@postgrespro.ru>
To: Álvaro Herrera <alvherre@kurilemu.de>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Euler Taveira <euler@eulerto.com>
Cc: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: NULL pointer dereference in syslogger with load_libraries() and -DEXEC_BACKEND at startup
Date: Thu, 16 Jul 2026 17:34:54 +0300
Message-ID: <ad5d772e-09d9-4248-97a4-0011afab9e71@postgrespro.ru> (raw)
In-Reply-To: <alew9Lk3BXiGZsm7@alvherre.pgsql>
References: <alew9Lk3BXiGZsm7@alvherre.pgsql>

On 15/07/2026 19:14, Álvaro Herrera wrote:
>> Shouldn't this be extern *PGDLLIMPORT* bool ... ?
> 
> Did you hit a problem with it?  If so, what was it?

Not a problem per se, rather a small inconsistency.
Since commit
8ec569479fc Apply PGDLLIMPORT markings broadly. (2022-04-08) <Robert Haas>
it seems to be a rule to mark all variables in .h files as PGDLLIMPORT.
Perhaps, except frontend-only ones.

As for now,
$ find src/include -type f -print0 | xargs -0 src/tools/mark_pgdllimport.pl
src/include/common/logging.h: adding 1 PGDLLIMPORT markers
src/include/postmaster/syslogger.h: adding 1 PGDLLIMPORT markers

modifies only two lines in two files. And common/logging.h is a
frontend-only, so it's a natural exception. So I think there is no need
to add another exception without explicit reasons, even though you are
right and it's hard for me to think of a realistic need to refer to that
variable from an extension.

-- 
Anton Voloshin
https://postgrespro.com






view thread (25+ messages)  latest in thread

Message-ID: <ad5d772e-09d9-4248-97a4-0011afab9e71@postgrespro.ru>
Permalink:  ../ad5d772e-09d9-4248-97a4-0011afab9e71@postgrespro.ru/
Also on:    postgresql.org/message-id/ad5d772e-09d9-4248-97a4-0011afab9e71@postgrespro.ru

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: a.voloshin@postgrespro.ru, alvherre@kurilemu.de, michael@paquier.xyz, euler@eulerto.com, horikyota.ntt@gmail.com, pgsql-hackers@lists.postgresql.org
  Subject: Re: NULL pointer dereference in syslogger with load_libraries() and -DEXEC_BACKEND at startup
  In-Reply-To: <ad5d772e-09d9-4248-97a4-0011afab9e71@postgrespro.ru>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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