From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Check stack depth in new recursive functions
Date: Wed, 08 Nov 2023 17:46:07 +0000
Message-ID: <E1r0mcx-004ViU-DN@gemulon.postgresql.org> (raw)
Check stack depth in new recursive functions
Commit b0e96f311985 introduced a bunch of recursive functions, but
failed to make them check for stack depth. This can cause the backend
to crash when operating on inheritance hierarchies several thousands
deep. Protect the code by adding the missing stack depth checks.
Reported-by: Alexander Lakhin <exclusion@gmail.com>
Discussion: https://postgr.es/m/b2ac2392-9727-5f76-e890-721ac80c1615@gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/b0f7dd915bca6243f3daf52a81b8d0682a38ee3b
Modified Files
--------------
src/backend/commands/tablecmds.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
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: alvherre@alvh.no-ip.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Check stack depth in new recursive functions
In-Reply-To: <E1r0mcx-004ViU-DN@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 DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox