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 1qeF5J-006EKa-MN for pgsql-general@arkaria.postgresql.org; Thu, 07 Sep 2023 13:30:13 +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 1qeF5I-002BEf-1N for pgsql-general@arkaria.postgresql.org; Thu, 07 Sep 2023 13:30:11 +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 1qeF5H-002BEV-Kl for pgsql-general@lists.postgresql.org; Thu, 07 Sep 2023 13:30:11 +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 1qeF5E-003Fta-F7 for pgsql-general@lists.postgresql.org; Thu, 07 Sep 2023 13:30:10 +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 387DTubm1694899; Thu, 7 Sep 2023 09:29:57 -0400 From: Tom Lane To: gzh cc: pgsql-general@lists.postgresql.org Subject: Re: ERROR: stack depth limit exceeded In-reply-to: <1e6b9056.492e.18a6e9a1798.Coremail.gzhcoder@126.com> References: <1e6b9056.492e.18a6e9a1798.Coremail.gzhcoder@126.com> Comments: In-reply-to gzh message dated "Thu, 07 Sep 2023 15:45:06 +0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1694897.1694093396.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Thu, 07 Sep 2023 09:29:56 -0400 Message-ID: <1694898.1694093396@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk gzh writes: > I upgraded the version of PostgreSQL from 12.13 to 12.16. = > If multiple subqueries or a large number of UNION ALL were used, = > the previously unseen error message "ERROR: stack depth limit exceeded" = will appear after upgrading the version. Please provide a self-contained example. The people who might be able to fix this are too busy to guess about what you are seeing. regards, tom lane