From: Michael Paquier <michael@paquier.xyz>
To: Álvaro Herrera <alvherre@kurilemu.de>
Cc: Anton Voloshin <a.voloshin@postgrespro.ru>
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 09:15:18 +0900
Message-ID: <algiltRh8fHYZD0s@paquier.xyz> (raw)
In-Reply-To: <alew9Lk3BXiGZsm7@alvherre.pgsql>
References: <4ccb96f8-0bac-4362-ac22-2f81d1b0062c@postgrespro.ru>
<alew9Lk3BXiGZsm7@alvherre.pgsql>
On Wed, Jul 15, 2026 at 06:14:30PM +0200, Alvaro Herrera wrote:
> Michael, looking at
> https://github.com/michaelpq/pg_plugins/blob/main/jsonlog/jsonlog.c
> do you see an issue with this variable?
I have not directly tested it yet (will perhaps do so later this
week or later), but I am pretty sure that this module is broken as-is
with v19 under EXEC_BACKEND. Not checking for syslogger_setup_done
and only redirection_done means that the module could try to send some
chunks of data to the syslogger without the file handles being set,
crashing the syslogger the same way as what I have done upthread.
I have created an item to look at that later, for now:
https://github.com/michaelpq/pg_plugins/issues/56
AFAIK, jsonlog is still used in some container setups even with the
in-core option in place since v15, folks have been keeping asking for
it. I suspect that there is close to zero use of it under
EXEC_BACKEND, but we surely should fix the issue anyway..
--
Michael
Attachments:
[application/pgp-signature] signature.asc (832B, ../algiltRh8fHYZD0s@paquier.xyz/2-signature.asc)
download
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: michael@paquier.xyz, alvherre@kurilemu.de, a.voloshin@postgrespro.ru, 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: <algiltRh8fHYZD0s@paquier.xyz>
* 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