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.94.2) (envelope-from ) id 1rhyhd-00EPeo-6u for pgsql-bugs@arkaria.postgresql.org; Wed, 06 Mar 2024 21:21:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rhyhb-00EYLm-RQ for pgsql-bugs@arkaria.postgresql.org; Wed, 06 Mar 2024 21:21:28 +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.94.2) (envelope-from ) id 1rhyhb-00EYAD-ID for pgsql-bugs@lists.postgresql.org; Wed, 06 Mar 2024 21:21:28 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rhyhY-003CaF-7m for pgsql-bugs@lists.postgresql.org; Wed, 06 Mar 2024 21:21:26 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 426LLNvo313083; Wed, 6 Mar 2024 16:21:23 -0500 From: Tom Lane To: Alexander Korotkov cc: Alexander Lakhin , pgsql-bugs@lists.postgresql.org Subject: Re: BUG #18374: Printing memory contexts on OOM condition might lead to segmentation fault In-reply-to: References: <18374-ebb8113ce4d02f0d@postgresql.org> <3120721.1709395887@sss.pgh.pa.us> <3140126.1709405398@sss.pgh.pa.us> <3148162.1709409519@sss.pgh.pa.us> <3399097.1709501969@sss.pgh.pa.us> Comments: In-reply-to Alexander Korotkov message dated "Wed, 06 Mar 2024 22:24:03 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <313081.1709760083.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 06 Mar 2024 16:21:23 -0500 Message-ID: <313082.1709760083@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Alexander Korotkov writes: > For removing recursion from memory context processing, please check > the patch by Heikki [1], and my slightly revised version [2]. > Links. > 1. https://www.postgresql.org/message-id/6b48c746-9704-46dc-b9be-01fe413= 7c824%40iki.fi > 2. https://www.postgresql.org/message-id/CAPpHfdtQVzkKgrxqKZE9yESnu7cAAT= VQbGktVOSXPNWG7GOkhA%40mail.gmail.com I'd forgotten about that thread. I'll comment there, thanks! The issue Alexander has identified about the kernel possibly not giving us as much stack as promised should stay in this thread, but we can discuss the idea of de-recursing mcxt.c over there. regards, tom lane