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 1wRvTm-002oOo-17 for pgsql-hackers@arkaria.postgresql.org; Tue, 26 May 2026 17:22:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wRvTi-005PLV-2z for pgsql-hackers@arkaria.postgresql.org; Tue, 26 May 2026 17:22:07 +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 1wRvTi-005PLN-0Z for pgsql-hackers@lists.postgresql.org; Tue, 26 May 2026 17:22:07 +0000 Received: from fhigh-a2-smtp.messagingengine.com ([103.168.172.153]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wRvTg-00000001YT1-0ua2 for pgsql-hackers@lists.postgresql.org; Tue, 26 May 2026 17:22:06 +0000 Received: from phl-compute-02.internal (phl-compute-02.internal [10.202.2.42]) by mailfhigh.phl.internal (Postfix) with ESMTP id E6ECC1400054; Tue, 26 May 2026 13:22:00 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-02.internal (MEProxy); Tue, 26 May 2026 13:22:00 -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=1779816120; x= 1779902520; bh=o0AsWYSFHB7aemzc4K199+ZTdsX7WwXMNHHr2ydcgOs=; b=U wd/9kag3WuTOZtpS1TsmbpQELuAnQIYdmlLZnqpywfMcnOB+2gzW5ksymJlpfYc5 AKjMeoyR2A31PfKIlP3lQqFOpB/jAOnr6v+mqcHNFwql1ct8qJoTnTTbnZA1hkPv VDKvQI/7utFOl7YmtH32I9qYDU+c/0DFzQ8qqqiIlaKKVFp22bmVpZhpTrLt3gLP vvnO3GMj/yatdZDigpmWV3mTtE3VORK7UXPEucJhEHZlTRotP+Dhwe8jO68J+IHb alivrHeJqGT8ZnDrI/wMJiuhwNrDibT1yBiZkFG0iM1RnwkKAd+1lWA6Q9bo0/Do d8V3dfcLDq6jnH4+EN8/Q== 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=1779816120; x=1779902520; bh=o 0AsWYSFHB7aemzc4K199+ZTdsX7WwXMNHHr2ydcgOs=; b=ufgbFtDLybtGetNEM 8wfd8HNqg/5uW3OiNgx5B5cCVbOU8LgLSiO1dBzPfeyMXeawYXg3GiP+Wii73fMV pCL7SuucdJGsgh3JyxbChfitscXzRScxUdrkiYlBp2cBfOZnuMCATGsiKr6if/P/ 4nT4AkIzweyFwDmkOkGsPFsF0hvLoCCar910aI89vkGewRxjVgQfzhRfestbL7TZ SDjp/8dUPiJ5ilTfjY5KOFHQqw5mkND24vZMg4iQ+Mpi4h+8XSUj6JhcuWLSwMSA BXvSUZNZsURP/WyAZmhZq98gPF4vhq2SAh8FWpDP+0AWm0RujUow/LqoZIq0KbYm PplcA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTFMNMDQ0q7VBh5hXpUohO4qWAacv1+GTAPt0EUocBDt7QDc6giVLkgGq8RR28KMBC EkTJg/n+y/djQADJjldfFyDi9+bceWGohEsEYBVvKT+i83zVESRXMfwBp2rjjjnnosQ34G Nfwf1thOtwvtuVhhyFdufIabEiosJ9Ecw/iSfae0nS886dyqY40sZL8vfzM2U7uXnbeB0A gRLQAESnuAxSCJe7AZyJc5T3TGh+g9e/icvg+oIsQmlt7jE523gWnK4sVIMbkCqk4EdNX1 ChkBWwN9ACi9MhQgMVltI4reTNrWms9+xasUArdo4b0tgj3oSvPYXVJMl/5m7/sCE8juD1 TjWGFR/NYeIBZXjfMl3Pi3b70r78vmusQPZRTKTd7yfy9utQT8BVFKNqEXrhzATt0pajwu ctJ19RHEnIO+VFdt2loLNsN5GIV/bLf6bu4sr8ePWDAceB/P+NfChQs6L8beDjfSBk9pxQ 0BwYcJDKERoow+fJZBe5N21fWTMlsDd//IUmPJ+NpCLyXVQNC0LHfR/Z/OXxXOD/Rt/L7i DG5G5Lc9gsA0zDJStEWQ+RQR+WVIjpXXjLhMUkeHBJX3Re2QYhb9hntgIeB0ekbu2N+UBu qWzGPB/ciuXiQnEajbJHSTRvPjUYhlcBV6Ey3e99zCk0N0wBI9EINY4bYrAA X-ME-Proxy: Feedback-ID: ie3de48e3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 26 May 2026 13:22:00 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kurilemu.de; s=schmee; t=1779816116; bh=MfARnD6VQ3CUzXihz76gEQ+PSdCPiTGxOGiMtnJrZAU=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=QWX1WByka/heBZ3TCj86JprZXqmtXOfRcgzA2tIMUv/fEqKIRbOwI535j2biS8ZZZ dqrvTBmz1mhgpl1D687Pk5P3+aOtx749lgurVTQf8oPi1YNMKpwmo+S/VADaXAtFFt zBtV7SDcTZ+qFgXgMlAaARriIkGbEmI8n6Kzdu06bXQFtZUGNUWKdlHHjuxJEG7Mne ETsfJDNBoHQAVbUsZmX6yBm2kAXsmsE4rdM80H+z8uSTqfuF8kTNxMy3W1Fjkm+RJw 75BdKH4rB8inLpvAjvnqtmjsU3nZSR0qona/I+9uTNXDVSUI0ikSOZWgtya6sy1qxH vH3x5hobOF6Zg== Received: by ida.kurilemu.internal (Postfix, from userid 1000) id D8611B0430E; Tue, 26 May 2026 10:21:56 -0700 (PDT) Date: Tue, 26 May 2026 19:21:56 +0200 From: =?utf-8?Q?=C3=81lvaro?= Herrera To: Euler Taveira Cc: Michael Paquier , 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-26, Euler Taveira wrote: > It fixes the issue for me. However, I'm wondering if we can avoid adding a new > boolean for it. We already have redirection_done that guarantees the syslogger > is working properly. Yeah, that was my first thought as well, but after looking at it, I thought it may be better not to mess with that, since it was almost surgical in how it was designed; furthermore, it is written to be transmitted from postmaster to its children, whereas this new state variable is local to the syslogger process. Also, consider the case where you have postmaster running for a while (so redirection_done has been set already), and for whatever reason syslogger restarts. Will it inherit the correct value? I don't know (I think it won't), and it seems error-prone to assume it will work correctly. I think this would only fail if for whatever reason the syslogger itself wanted to print an error before setting up the file descriptors, but I don't think this is impossible: for example, if postmaster_child_launch() runs into an OOM during internal_forkexec(). Plus, redirection_done means something completely different: it is used to say that syslogPipe[] has been set up for message chunk transmission. The new variable indicates that the logging file descriptors for the various output files (syslogFile etc) have been set up in the syslogger process. All in all, I don't think we should cut corners here just to save one boolean variable. -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ "No hay ausente sin culpa ni presente sin disculpa" (Prov. francés)