diff --git a/src/backend/go.c b/src/backend/go.c index 8cd800db3e48..4b20f854f1ff 100644 --- a/src/backend/go.c +++ b/src/backend/go.c @@ -221,12 +221,13 @@ void optfunc() // Each pass through the loop can reduce only one level of comma expression. // The infinite loop check needs to take this into account. + // Add 100 just to give optimizer more rope to try to converge. int iterationLimit = 0; for (b = startblock; b; b = b->Bnext) { if (!b->Belem) continue; - int d = el_countCommas(b->Belem); + int d = el_countCommas(b->Belem) + 100; if (d > iterationLimit) iterationLimit = d; }