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

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Ayush Tiwari <ayushtiwari(dot)slg01(at)gmail(dot)com>
Cc: Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Alvaro Herrera <alvherre(at)kurilemu(dot)de>
Subject: Re: NULL pointer dereference in syslogger with load_libraries() and -DEXEC_BACKEND at startup
Date: 2026-05-25 23:06:10
Message-ID: ahTV4rCj93_CqlDt@paquier.xyz
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message jian he 2026-05-25 23:28:06 Re: Rename Postgres 19 to Postgres 26 (year-based)?
Previous Message Paul A Jungwirth 2026-05-25 23:01:31 Re: Fix bug of UPDATE/DELETE FOR PORTION OF with inheritance tables