From: gzh <gzhcoder@126.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: ERROR: stack depth limit exceeded
Date: Fri, 8 Sep 2023 11:32:48 +0800 (CST)
Message-ID: <1211c4ba.2822.18a72d975fc.Coremail.gzhcoder@126.com> (raw)
In-Reply-To: <1694898.1694093396@sss.pgh.pa.us>
References: <1e6b9056.492e.18a6e9a1798.Coremail.gzhcoder@126.com>
<1694898.1694093396@sss.pgh.pa.us>
I'm sorry I didn't explain the issue clearly.
Our system is currently running on PostgreSQL 12.13 and we are planning to upgrade to PostgreSQL 12.16.
We are currently in the evaluation phase.
In the Release Notes for PostgreSQL 12.14, we saw the following change:
https://www.postgresql.org/docs/release/12.14/>Add recursion and looping defenses in subquery pullup (Tom Lane)
>
>A contrived query can result in deep recursion and unreasonable amounts of time spent trying to flatten subqueries. A proper fix for that seems unduly invasive for a back-patch, but we can at least add stack depth checks and an interrupt check to allow the query to be cancelled.
Our understanding is that this change will cause some complex SQL statements
that were previously not reporting errors to report errors in the new version.
If our understanding of this change is correct, we would like to find out
which SQL statements will report errors in the new version.
Do you have any good methods for doing this?
At 2023-09-07 21:29:56, "Tom Lane" <tgl@sss.pgh.pa.us> wrote:
>gzh <gzhcoder@126.com> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-general@postgresql.org
Cc: gzhcoder@126.com, tgl@sss.pgh.pa.us, pgsql-general@lists.postgresql.org
Subject: Re: ERROR: stack depth limit exceeded
In-Reply-To: <1211c4ba.2822.18a72d975fc.Coremail.gzhcoder@126.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox