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 1wRpf3-002jf5-2j for pgsql-hackers@arkaria.postgresql.org; Tue, 26 May 2026 11:09:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wRpf0-004MZf-00 for pgsql-hackers@arkaria.postgresql.org; Tue, 26 May 2026 11:09:22 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wRpey-004MZX-2Y for pgsql-hackers@lists.postgresql.org; Tue, 26 May 2026 11:09:22 +0000 Received: from fhigh-b2-smtp.messagingengine.com ([202.12.124.153] helo=fhigh-c2-smtp.messagingengine.com) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wRpew-00000000qMY-3mzE for pgsql-hackers@lists.postgresql.org; Tue, 26 May 2026 11:09:20 +0000 Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfhigh.stl.internal (Postfix) with ESMTP id 5122E7A01BF; Tue, 26 May 2026 07:09:17 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-04.internal (MEProxy); Tue, 26 May 2026 07:09:17 -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=1779793756; x= 1779880156; bh=yDQ7d4tlImR/3sbeJ38Bh6BPJ3i1WAecEAtVoN7nbmY=; b=F iViUPonKGmyGMBZnfBUwzygyMoi/he7/SLiXwEpxTYAxT3YxfIqfMJP0hzJ/97Cd VzxaGKJC3e9YhzP036f+eadoHfsBori3/PscRKYJ4o4ZGykzNJDj+z3n5+umoj/y ZqXlDL4h9INYZNluS8/fvh15Lv0VTOLDZKv+SLH5B1dSA6UgMSal77hD9OgZdr0n Gq6ye2AfXxRv/lEvYOCtnQVatTKa/VMeLwuuFT81aLl1o/7nJN1lqsbSiqUaHr3V YCnlwPlpBmRfSSJMp4ujGz2CEW3m7t0mI5tPJearbiNWG2AHWbRUoq0KkLePoxWJ ZyciqOajVTWTRw/6pcRCg== 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=fm3; t=1779793756; x=1779880156; bh=y DQ7d4tlImR/3sbeJ38Bh6BPJ3i1WAecEAtVoN7nbmY=; b=pfC48DzR/aSFfmuqJ KdJeeZ1x4oNULijTEK102t/nsjU+xSD5sVihtlnOLo+zoLG034ypVZhooUt2cKs3 LVmhMW7dM98ph1lLI9Mj+GSVJTZrFl2vNJ97dC1/0pTyU4s+1p2bHZ6nyxHRQ6LB lYuMhlzFbgq3+d3GMSzh+/wEErBHmhBrzGaCMrMNax3M9g5OYTjeexpnfdc2e22s whLA3asndqpqKP/ZzYIouZRxou01rcb0ZM3NvVgBqIZJOht3PHe6yAyRVOWQYIeZ /7Gef/+4uWHgtxh1IMnz5MwWOwVjNpURiGda3j585qHnCwlauN2BmLb3LHTEEJZd GmHzA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTE6bFwGd4O7VBogetvphRnfJvNhine2xpnfZQnbgICsWPjxvUWhIMNVxMHHleyPb0 6C5AEK4bJkwFR5RAP08F7o3I8zWeyB+ZxzSFbHrV6y5e67jjclfrZOQPxcv/o8iSo6ioYH zW5bczmOh/7RPVV8JZLsp2KHTUwu2IvRiBllVqw3DElrXTfNyQDaWpdK1imP360QpCgNKC QKUMfQqiY3DT+cRdey3L/BgClpS+gRiJpmiI3n3fGq2CLAdspAFMbCzoz39+UKsERkw8h0 WDfBIv1cCrjTGPz7Jn99LPwT71GMCXlvknV3GO2ZhglC05TA5NLfG+8xu2fRfjaqwWK5Pe Selo02oJWDpt2B5/JfOGWGWdtyJX8eEBRLuw63LqorE7l+eEu5NDdLTIaiJWuOwERxUyvR JaProcL0RdNCilOGedcGuiYRYEaBAhozWk0vDMCQpaZ+/H9979ZTs2FN9Qbt+uszS7D8tG 9ycZeSo4uuc4HSWhSHpJ/UcBNEPmgaeGRrUNETHwAubpzla3w7nR9yCqn6fj7PLdCBWk7A RTgtBphwIUuDFIz2ovNMBchLeFFjCOvKJDTwHnOyfURchsGH+Kmsr32OStm+iRiKo2lkBX n2fElBRHtK0AanTdAtSsK7jw2DLBqKEi2atTFLlazdcSSYzAnda23vv3GN7A X-ME-Proxy: Feedback-ID: ie3de48e3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 26 May 2026 07:09:16 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kurilemu.de; s=schmee; t=1779793753; bh=dH2OS089X4uRtvmptABub4gWzqWr9J0c9VdCE/aTSok=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=painhd2iwG/nUs/3oZ6KDmSsPIy6xPFFK9IIqVGK59zROeh2z9VdhIFU+QY0FCF1V 4ePR8bN3kFdcAB4R0YdTSfKERSK9THw4OgWcluerTmwZIxlZqeEZU/NLD8pZgIEyAy wAP9GM1oiVwoXyWuLNimJ6P8JoT4HHCd0BgYeHFjj7oLPeNpecKzId0m0SP0CyzERj GQFBvS/qOPyYr9XqZhMupUzTZaORHBqgZGZM2b1PUrG69/y7dBNuMzQuXxyU1KiQam RC57JszRmrJJ/flDGXBmHSIDTZL91HLDbs2rfLKUK4FMYulxWhcMlPoI1KwS+pCDOx kbI0XsRBpTUIw== Received: by ida.kurilemu.internal (Postfix, from userid 1000) id C0BB8B042E9; Tue, 26 May 2026 04:09:13 -0700 (PDT) Date: Tue, 26 May 2026 13:09:13 +0200 From: Alvaro Herrera To: Michael Paquier Cc: Kyotaro Horiguchi , euler@eulerto.com, 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: multipart/mixed; boundary="oji7a74ejnbtd35k" 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 --oji7a74ejnbtd35k Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit On 2026-May-26, Michael Paquier wrote: > This issue is different, it is a Postgres logic bug, so adding an > exception like the one you are suggesting is just a shortcut hiding > the real issue: the log file is not ready yet, but the syslogger is > invoked at a point when it thinks the log file exists. I think we can solve this easily by flipping a new Boolean value at the same point were MyBackendType was previously set. The attached POC fixes the scenario you described; can you confirm? It needs some additional comments, of course. (There is one more place in elog.c where we check that MyBackendType is _not_ B_LOGGER, but I think that one is correct as-is; and I'm wondering if that would behave correctly before 0c8e082fba8d.) -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ “Cuando no hay humildad las personas se degradan” (A. Christie) --oji7a74ejnbtd35k Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="0001-POC-syslogger-add-Boolean-state-indicating-readiness.patch"