summaryrefslogtreecommitdiff
path: root/src/backend/optimizer/util
diff options
context:
space:
mode:
authorAlexander Korotkov <akorotkov@postgresql.org>2024-02-16 16:02:00 +0200
committerAlexander Korotkov <akorotkov@postgresql.org>2024-03-11 03:06:10 +0200
commit445c7e38f65f4abee1e55b31a849c31b18d99d4b (patch)
tree1c7f26267a0db17a7621e46f76cfbe3796b490d5 /src/backend/optimizer/util
parent20b85b3da6f8d885a980a6d7003fe5535686a5cb (diff)
Backpatch missing check_stack_depth() to some recursive functions
Backpatch changes from d57b7cc333, 75bcba6cbd to all supported branches per proposal of Egor Chindyaskin. Discussion: https://postgr.es/m/DE5FD776-A8CD-4378-BCFA-3BF30F1F6D60%40mail.ru
Diffstat (limited to 'src/backend/optimizer/util')
-rw-r--r--src/backend/optimizer/util/clauses.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/backend/optimizer/util/clauses.c b/src/backend/optimizer/util/clauses.c
index 4030f17d737..4ad66b9594d 100644
--- a/src/backend/optimizer/util/clauses.c
+++ b/src/backend/optimizer/util/clauses.c
@@ -2456,6 +2456,10 @@ static Node *
eval_const_expressions_mutator(Node *node,
eval_const_expressions_context *context)
{
+
+ /* since this function recurses, it could be driven to stack overflow */
+ check_stack_depth();
+
if (node == NULL)
return NULL;
switch (nodeTag(node))