Re: NULL pointer dereference in syslogger with load_libraries() and -DEXEC_BACKEND at startup - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: NULL pointer dereference in syslogger with load_libraries() and -DEXEC_BACKEND at startup
Date
Msg-id ahTV4rCj93_CqlDt@paquier.xyz
Whole thread
In response to Re: NULL pointer dereference in syslogger with load_libraries() and -DEXEC_BACKEND at startup  (Ayush Tiwari <ayushtiwari.slg01@gmail.com>)
List pgsql-hackers
On Mon, May 25, 2026 at 01:54:28PM +0530, Ayush Tiwari wrote:
> So I think the bad assumption is that MyBackendType == B_LOGGER means
> write_syslogger_file() is ready to use.  A fix probably needs to make the
> direct syslogger-file path conditional on the FILE handles being ready, and
> that should cover stderr, CSV and JSON paths.

I am not sure.  We are attempting to write to the syslogger file but
we should not do so yet.  This code path should not be taken and
properly redirected to stderr, we should not use a shortcut based on
the FILE existing or not.

I have forgotten to add Alvaro in CC yesterday, done now.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Paul A Jungwirth
Date:
Subject: Re: Fix bug of UPDATE/DELETE FOR PORTION OF with inheritance tables
Next
From: Michael Paquier
Date:
Subject: Re: [BUG] CRASH: ECPGprepared_statement() and ECPGdeallocate_all() when connection is NULL