agora inbox for pgsql-committers@postgresql.org
help / color / mirror / Atom feedFrom: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Check for stack overflow when rewriting graph queries
Date: Fri, 24 Apr 2026 06:23:23 +0000
Message-ID: <E1wG9wg-002SvR-1E@gemulon.postgresql.org> (raw)
Check for stack overflow when rewriting graph queries
generate_queries_for_path_pattern_recurse() and
generate_setop_from_pathqueries() are recursive functions. For a
property graph with hundreds of tables, a graph pattern with a handful
element patterns can cause stack overflow. Fix it by calling
check_stack_depth() at the beginning of these functions.
Author: Satyanarayana Narlapuram <satyanarlapuram@gmail.com>
Reviewed-by: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Discussion: https://www.postgresql.org/message-id/CAHg+QDfgK0xddH8f3eAb+UVn7sBDOnv8RvM6OkP4HtHAt6aD7w@mail.gmail...
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/2ff289d03939498a656a0c6cf2da08623f8357b4
Modified Files
--------------
src/backend/rewrite/rewriteGraphTable.c | 7 +++++++
1 file changed, 7 insertions(+)
Message-ID: <E1wG9wg-002SvR-1E@gemulon.postgresql.org>
Permalink: ../E1wG9wg-002SvR-1E@gemulon.postgresql.org/
Also on: postgresql.org/message-id/E1wG9wg-002SvR-1E@gemulon.postgresql.org
reply
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-committers@postgresql.org
Cc: peter@eisentraut.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Check for stack overflow when rewriting graph queries
In-Reply-To: <E1wG9wg-002SvR-1E@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox