Re: ERROR: stack depth limit exceeded

From: gzh <gzhcoder(at)126(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: ERROR: stack depth limit exceeded
Date: 2023-09-08 03:32:48
Message-ID: 1211c4ba.2822.18a72d975fc.Coremail.gzhcoder@126.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>gzh <gzhcoder(at)126(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sai Teja 2023-09-08 05:51:13 Re: Huge input lookup exception when trying to create the index for XML data type column in postgreSQL
Previous Message Peter Geoghegan 2023-09-08 01:22:21 Re: Query performance going from Oracle to Postgres