Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jLAZV-0007OJ-NU for pgsql-hackers@arkaria.postgresql.org; Sun, 05 Apr 2020 19:04:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jLAZU-00043u-KP for pgsql-hackers@arkaria.postgresql.org; Sun, 05 Apr 2020 19:04:40 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jLAZU-00043n-DV for pgsql-hackers@lists.postgresql.org; Sun, 05 Apr 2020 19:04:40 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jLAZO-0002lT-4s for pgsql-hackers@lists.postgresql.org; Sun, 05 Apr 2020 19:04:39 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id 035J4UGj032138; Sun, 5 Apr 2020 15:04:30 -0400 From: Tom Lane To: Andres Freund cc: pgsql-hackers@lists.postgresql.org, Robert Haas Subject: Re: CLOBBER_CACHE_ALWAYS regression instability In-reply-to: <20200405185749.5pi3k6w2jd2x3kgu@alap3.anarazel.de> References: <30675.1586111599@sss.pgh.pa.us> <20200405185749.5pi3k6w2jd2x3kgu@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Sun, 05 Apr 2020 11:57:49 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <32136.1586113470.1@sss.pgh.pa.us> Date: Sun, 05 Apr 2020 15:04:30 -0400 Message-ID: <32137.1586113470@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Andres Freund writes: > Another avenue could be to make ParseFuncOrColumn et al use less stack, > and hope that it avoids the problem. It's a bit insane that we use this > much. That would only reduce the chance of getting a stack overflow there, and not by that much, especially not for a CLOBBER_CACHE_ALWAYS animal which is going to be doing catalog accesses inside there too. > We don't have to go there in this case, but I've before wondered about > adding helpers that use an on-stack var for small allocations, and falls > back to palloc otherwise. Something boiling down to: Seems like that adds a lot of potential for memory leakage? regards, tom lane