Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wWeKB-002lMW-0o for pgsql-hackers@arkaria.postgresql.org; Mon, 08 Jun 2026 18:03:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wWeK9-003R2G-2a for pgsql-hackers@arkaria.postgresql.org; Mon, 08 Jun 2026 18:03:45 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wWeK9-003R20-0i for pgsql-hackers@lists.postgresql.org; Mon, 08 Jun 2026 18:03:45 +0000 Received: from fhigh-a4-smtp.messagingengine.com ([103.168.172.155]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wWeK6-000000020qp-22H8 for pgsql-hackers@lists.postgresql.org; Mon, 08 Jun 2026 18:03:44 +0000 Received: from phl-compute-06.internal (phl-compute-06.internal [10.202.2.46]) by mailfhigh.phl.internal (Postfix) with ESMTP id 2CCE8140010D; Mon, 8 Jun 2026 14:03:40 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-06.internal (MEProxy); Mon, 08 Jun 2026 14:03:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kurilemu.de; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to; s=fm2; t=1780941820; x= 1781028220; bh=Nei6aSaUbRUrRlfEFRh7bI9Dyl6kUPcNjDTeTncCIyY=; b=D Zrshdm4EV50Jqb9LaAF3wftclvo8kLkfEyTH6uCtluJRXyUiyf0J3RGuJp/nJ+2F pwdyxul7VdTApf3XP2JtubxC2K7bs3q/DUh4EuSFCDbNRRxsgSaw8aoNPro2LvrL VIIvpSs7F3uL/y+tVsFXdInpGuQ5ItYILziPhv/WhaXbVE+eJldSKLVTT9iYIBUG 95xKZsx9RLBN3g+gl5l9BMz7J95T404iz6xFN1e7xTbALU0hf+Kz4BK+Ov5a4x81 E/ANonYUvBlbkbunsfdsVbjqEMkKafQOFHQldoQ5F8oya1n8aqZYaG2Y80LWSt74 PUkkZCXlb88PRRwOE9bhg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1780941820; x=1781028220; bh=N ei6aSaUbRUrRlfEFRh7bI9Dyl6kUPcNjDTeTncCIyY=; b=aXq9IOaZgKbVksafF WZHOAPT+h7XAZs37LY+thTPOeBRHdAPHrXaS4wIErX63lbb0wkpNOXXgSpzFetrB A3JsxxinkuXw10y5T6oGe0cG75nLf4s2kVZXBY3xcLFEgT45bbYTSAIxyxIci5jS nVzmE303y/s3HhsR+Gelg3Iv21/XShIxQT5t3Nz+ov04hiKr3/JGoB2c152n9dsr Dc7FsANKKlQUEH+EeIk/QkMddl/emV0ZQw5Bqik8joB0DeuQRaAsE5t9YXNeH7U7 j0gRlpwKk6TvZ/HB4YpCo2VzHP7vs592L1bcfP9LbZ24v35+wY1Vmuha+J3oQdKF f+tiQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTGurnME4wr05vWtMy2no9QgCBQrPOp0/fSFi6dZPn9LGcZ8xjSqAKX5EeOKYYkyzT ZoXx2jw8jWoxN9nH1fbcdD8y/FSVN868BSDiCDJ9PM6thSjIiGpQzPnS5c5HbrIrsXr7iE 39JrEwVARNw2WvbXfpBj4+kD+YQMQ8Qx+W7IUMhVQ4plar1PxlkhvHpRHLWDnmMJS5ycfc MLEbsHDTfTHryqo6FTOazKK60RDDYjQOVy8DsxFvzsex+UYFOMddNn+dtu0+c7v5SbRQ+L TCoxLVICkgtok5NQUVyww7lY6N6L3h8aV/mBboZSYIbjoCQXkA0PSBkadk0km7VP3V74K6 fDjjkfxUrlRfo69JNpRDuS5kvdLqXBK0L4CyoBm8VV51zVouUoTnUGRt0hH9I/0Piy8vq5 PqZ2+F7uMg09NsahqENDriMgewIrEH6iZK9ZY4pD09l3V4AbT1yxW6XcdvBDeG/DW1Uf3f Jx5ZUdvpgwl7EUyxCeCq+zf9BaHmqV+hzcCa+z298+RpphoCI+QAyxSQTtuDEwVTWvHXOU 6ojV60doPli4eW7LIY0nUC7DKgknc63N4t0e8rDDjMKG+oESS+/gYtxqmV+fADpk6KnQxB kub69H8BqZyWEdCP7Nv5d+6kEI24YOb1jbJs71AeV0HCJLTxB6E87VXTpmaQ X-ME-Proxy: Feedback-ID: ie3de48e3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 8 Jun 2026 14:03:39 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kurilemu.de; s=schmee; t=1780941815; bh=wSSYG5Vk+8ainfedLKNSkuVMY8//KAI0FpR/9QJUNpc=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=sBtt3qI7f7pot6zw2f/yc2CoX6tuqveHEh8Ghu/DrBmyWVCzz3JiDpgj5g4WA3gnJ Jcx7iRF8J27r32tw6tZWFJvdKczWi5vGXbD8CC5o109UwR4zPvEfsg/7QjtUCOv9oU q5hrqbwipJtNoStydcGmF2Hk7/CXdafH0xyZ6snLQoS7kKCAcj0efJvvATC4IaXN/1 mG0g+jv4y/Zm1n+ox0LTd7y5Ma3ySWUqTkP6s7NYjcVGc3k9q9rbxzJHbZ1d25iuVa YBRuYGakm/I1pxEx8Mpcen7vAjceO4EXaWilQHUwVBouBFhtElytCG/X8Sl5/i+4sP 2gG2RPnrixCUg== Received: by ida.kurilemu.internal (Postfix, from userid 1000) id 63C7EB0065B; Mon, 08 Jun 2026 20:03:35 +0200 (CEST) Date: Mon, 8 Jun 2026 20:03:35 +0200 From: =?utf-8?Q?=C3=81lvaro?= Herrera To: Michael Paquier Cc: Euler Taveira , Kyotaro Horiguchi , pgsql-hackers@lists.postgresql.org Subject: Re: NULL pointer dereference in syslogger with load_libraries() and -DEXEC_BACKEND at startup Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2026-May-27, Michael Paquier wrote: > My first reaction is that we may want to update the two code paths of > csvlog.c and jsonlog.c with a similar check, switching away from > MyBackendType to your new syslogger_setup_done. That would be more > defensive in the long-term if someone has the idea to refactor or > reshape this code. Right, done, thanks. I tested this by messing with pg_ctl's 004_logrotate.pl; as far as I can tell, it's all working fine. I did notice that if you have an elog(WARNING) very early in syslogger, it appears in postmaster's stderr only and not in the log files. I'm not fussed about this ... as long as nothing crashes, it's fine. > It also looks important to me to plant a few comments to document the > purpose of the flag (which is I'm sure something you were going to > do). It is not complicated to see what's the purpose by grepping for > syslogger_setup_done, but it would be less guessing for the reader. Yep, done and pushed. I wondered if the MyBackendType changes could have an effect on early-startup of other process types, but I couldn't find anything actionable. -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/