Re: BUG #17583: Server crashes on executing CROSS JOIN with very big number of tables
Richard Guo <guofenglinux@gmail.com>
From: Richard Guo <guofenglinux@gmail.com>
To: Егор Чиндяскин <kyzevan23@mail.ru>, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Date: 2022-08-12T09:22:57Z
Lists: pgsql-bugs
Attachments
- v1-0001-Check-for-stack-overflow-in-transformFromClauseIt.patch (application/octet-stream) patch v1-0001
On Fri, Aug 12, 2022 at 5:03 PM Richard Guo <guofenglinux@gmail.com> wrote: > > On Fri, Aug 12, 2022 at 4:11 PM PG Bug reporting form < > noreply@postgresql.org> wrote: > >> I got server crashed while executing the following query: >> (echo "SELECT * FROM t1 ";for((i=2;i<100000;i++));do echo "CROSS JOIN t$i >> ";done; echo ";") | psql >> with the following backtrace below: >> Core was generated by `postgres: egorchin egorchin [local] SELECT >> > > > Function transformFromClauseItem() is driven to stack overflow. We need > to add some check_stack_depth() checks here and maybe other more places. > Attach a patch to add the check for transformFromClauseItem. Thanks Richard
Commits
-
Catch stack overflow when recursing in transformFromClauseItem().
- e07ebd4b6e60 16.0 landed
- ba516fb0715c 12.13 landed
- b744e13b0217 11.18 landed
- 60f876317efc 13.9 landed
- 496ab1d6c8d8 14.6 landed
- 362032f1768e 10.23 landed
- 00ac61695e5c 15.0 landed