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 1wS2md-002uUu-2W for pgsql-hackers@arkaria.postgresql.org; Wed, 27 May 2026 01:10:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wS2mb-006ePA-27 for pgsql-hackers@arkaria.postgresql.org; Wed, 27 May 2026 01:10:06 +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 1wS2mM-006eP0-19 for pgsql-hackers@lists.postgresql.org; Wed, 27 May 2026 01:10:06 +0000 Received: from fhigh-a3-smtp.messagingengine.com ([103.168.172.154]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wS2mK-00000001bzw-0yx1 for pgsql-hackers@lists.postgresql.org; Wed, 27 May 2026 01:09:51 +0000 Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfhigh.phl.internal (Postfix) with ESMTP id E86E014000EA; Tue, 26 May 2026 21:09:44 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-04.internal (MEProxy); Tue, 26 May 2026 21:09:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1779844184; x=1779930584; bh=VpgXQ0EIwn aBXxmiwXI33S/1ZZNfgtza0DsoBxiV+zQ=; b=HR6ehDJLT9EnNw+kI75WT2eB8w CXOOMb4JhrWgzpY4KV2/ZZdiXEUOyapzXT4AE7CBQ+rbPz5PknSR50CqfPpA8UiY YGvGLMAyeMNixX7YrX7EjiHxR1ky+3zEF9+nqrBSKPYowqaGZpFtXhdTxW8A/BCT TX0fwIF51qejFAhf5OuejlZmHWpUNBUrBCS0tvFBWHcsqp6pp9tU1ZVUDrqCR9sH S8xO13Z62zzQunNKhB4XOsFNXzGnzZ1ekDVVXXvNt4/X0we+nh7ZL1qsvPBiq4zl iNx4rqH6Xi85wXTpLg6vy7ofczCMtjDiFA+9DAa3HetBiZYkCpY49uSZ/RDA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1779844184; x=1779930584; bh=VpgXQ0EIwnaBXxmiwXI33S/1ZZNfgtza0Ds oBxiV+zQ=; b=pv2Yc5gtCo7F5Oq363pTT2RDRsm6aVcWsyTgwierCT1AnynWyYT DkLTacRLjDB7GkgvJtyYaHY4V05wBuklAXw8UR9k81hjUz1cZ5DliTsFOMgJOyr4 mNWjWe2dPxozwcNLVKXfAbgmYYwNBrwtsxgJrsEazsUOjjxQoBAl2rWXw/JTs0tQ htVcwDEuHtJIipUM24TdEF2I01VW2+FDxEX1hnxn2rnsLTLeVovSaWvWlebrS4wX zTcIKlbXuSYTh2wslFBBEex+Ddqgg0SIh7HTBj0nlmFJIcVot0mag7echNbVttn7 0s2WP5/OA9rsOQd0aa7ItrXDzJ0OJO9COLQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTEE97g+nafpO+BYPED4ai32MKFnCfGhrFS7blzickHI65JvK58cYud8xh2VbVVFEu izNKeJLYuoQqz0hYnHUMpH0X3HbmYHjDfNkr/6v/v00xgqABp6uuWNGO5LuIv2OaQTQnD4 +hPYZ0TycpglxzmJkomLMEgRUNiXVRy/BwqolUF4gNG8zWvXBkTpAvMwo9Y9mrpEHOwndN 8RhRamHewf0RaGmsCCXfId1cI5oO/4Xkzi6+nJODPBetsyn+fgm7ouktk1k366UaoowXyk jnnm38lt46OG5GewMLeJn+n1d0vy/FWZobn54UWQn9yBed8wJ/WE31xVuUB5p1mCs9ipHJ QEP9+aYShfSC2nH1A6ig75j2hZG7yF82AJYnNloZSJOCMxgNo6oNYvaurHeZvCjZEe9zTn p2LCxw59PUxyW0sWP8KPwvq8MEVlqy+k4w+5FbX4RN/EJCJOCjhtZSS4lOSCP4KIgXMTz+ KaVPJ8SQhxKcxcpkR2GXhhRsXAkm9UTH5uyEcWxtbldFGS73v61dHHWkBDwEYHrFGJW2kO vv7lgJ4hi8OeDL1DKEj8MK3dwoDl7eiZvh3gasgyUuVVoRYkW+sZx3uByCX95xmV3J0oM9 30qXKGv2sVwzGxFlD5ImmueVvFUWfDB5L2Sp4dPxyUMDwdsI887kNbLsoCQA X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 26 May 2026 21:09:43 -0400 (EDT) Date: Wed, 27 May 2026 10:09:39 +0900 From: Michael Paquier To: Euler Taveira Cc: =?iso-8859-1?Q?=C1lvaro?= Herrera , Kyotaro Horiguchi , pgsql-hackers@lists.postgresql.org Subject: Re: NULL pointer dereference in syslogger with load_libraries() and -DEXEC_BACKEND at startup Message-ID: References: <1db53fa8-f259-4a31-8c83-b13fb4f813eb@app.fastmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="UTz07byKkQbaghCe" Content-Disposition: inline In-Reply-To: <1db53fa8-f259-4a31-8c83-b13fb4f813eb@app.fastmail.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --UTz07byKkQbaghCe Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, May 26, 2026 at 09:13:30PM -0300, Euler Taveira wrote: > As I said I'm fine with your proposed patch. With the patch posted at [1] in place, the problem is indeed gone. 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. 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. Keeping redirection_done out of this decision-making logic sounds indeed wiser, the flag serves a different purpose.. As a whole, I'm fine with this idea. [1]: https://www.postgresql.org/message-id/ahV9KzLOqvOw78C3%40alvherre.pgsql -- Michael --UTz07byKkQbaghCe Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmoWRFMACgkQnvQgOdby QH3jZg/9GZPiKWI/ebNRaV8WQRmjqVWvS06WrapumpIue932ZPpjD8cC9w2WzsUg vCnsjhBEL93xKvNl/RR3XqVRjfbsLsAna9tO6eb5mSN9YQ/CApWpmwjPO2kzZiey h+RaT3/oUBHS+JGKC11NeN9N7ryDJxz9ytrz+XuPhnurfdPItfOlBV6MnZsP64Eu MFCCk8siZaz7T2aJn/Ai0lrFuCvB0ZaVePhrHtC3AMiJXD1Rl129XLNEskBs0Izf Ni1aqSLr/WTeUU8MGFGsTTHanrRvsC07irajLW09lGMxSxJv97mNHbuOwwnJ6fXv +ftw4n66as+TtgOaYeVxU9jGSHOiFdhc0m8pxgKujkBvky4rny47cievI9pSfb2L Ve9eBiJhAny3a8G6ggO+2zytZ7p96pU1QFoKfqV3a56NsKHY//lJmHk2wQAeWFxH QA8JP6fGHkphhc6kZ34cEra8bikcCIXsLqm7CEo90ORZl1zZiQNHpJeJC1ytHD2n FS7shFJlyuTQSsyXic8RYfSxu4WtnWGiaKc9EyRW8YIeahZRvGKJ+98QpTziIYOY 9OmAoXlrkAllaTXfmzpAu1pxF5VyDjpeEaIqXCqIEVbkLwBce7ypXNXYSCWFrZZV Q24wPBhOXE0itAzOPh9mehUVqi38qK/qACJGK6EIECgoQhHh4R0= =N5pC -----END PGP SIGNATURE----- --UTz07byKkQbaghCe--