Check for stack overflow when rewriting graph queries
Peter Eisentraut <peter@eisentraut.org>
Author:
Peter Eisentraut <peter@eisentraut.org>
Date: 2026-04-24T06:18:21Z
Releases:
19 (unreleased)
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.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/rewrite/rewriteGraphTable.c | modified | +7 −0 |
Discussion
- Bug: Missing check_stack_depth() in GRAPH_TABLE rewriter 4 messages · 2026-04-11 → 2026-04-24