agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
From: Álvaro Herrera <alvherre@kurilemu.de>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix syslogger NULL-pointer-dereference in EXEC_BACKEND
Date: Mon, 08 Jun 2026 17:50:53 +0000
Message-ID: <E1wWe7h-001d4x-1n@gemulon.postgresql.org> (raw)

Fix syslogger NULL-pointer-dereference in EXEC_BACKEND

Commit 0c8e082fba8d changed the time at which MyBackendType is assigned,
breaking a careful choreography in syslogger to decide when to write
messages to its own log files.  Fix by flipping a boolean at the
(approximate) location where previously MyBackendType was set, instead
of depending on MyBackendType directly.

Author: Álvaro Herrera <alvherre@kurilemu.de>
Reported-by: Michael Paquier <michael@paquier.xyz>
Reviewed-by: Euler Taveira <euler@eulerto.com>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/ahP-JT4ZRPyobnLb@paquier.xyz

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/fb23cc7e81db181bfb3dcfed6ad0731a3473d4e1

Modified Files
--------------
src/backend/postmaster/syslogger.c | 19 +++++++++++++++++++
src/backend/utils/error/csvlog.c   |  2 +-
src/backend/utils/error/elog.c     |  6 +++---
src/backend/utils/error/jsonlog.c  |  2 +-
src/include/postmaster/syslogger.h |  1 +
5 files changed, 25 insertions(+), 5 deletions(-)



Message-ID: <E1wWe7h-001d4x-1n@gemulon.postgresql.org>
Permalink:  ../E1wWe7h-001d4x-1n@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1wWe7h-001d4x-1n@gemulon.postgresql.org

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-committers@postgresql.org
  Cc: alvherre@kurilemu.de, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Fix syslogger NULL-pointer-dereference in EXEC_BACKEND
  In-Reply-To: <E1wWe7h-001d4x-1n@gemulon.postgresql.org>

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

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