From: Alexander Lakhin <exclusion@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael@paquier.xyz>
Cc: zuming.jiang@inf.ethz.ch
Cc: pgsql-bugs@lists.postgresql.org
Cc: kyzevan23@mail.ru
Subject: Re: BUG #17995: Segmentation fault caused by UPDATE statement
Date: Mon, 26 Jun 2023 08:00:01 +0300
Message-ID: <916440ee-5c84-abce-e2c8-562dc5775404@gmail.com> (raw)
In-Reply-To: <636983.1687753628@sss.pgh.pa.us>
References: <17995-9f20ff3e6389db4c@postgresql.org>
<285547.1687636319@sss.pgh.pa.us>
<68148dac-a574-f421-2905-51ebde2fe000@gmail.com>
<ZJkSW1F78yDV2bjl@paquier.xyz>
<636983.1687753628@sss.pgh.pa.us>
26.06.2023 07:27, Tom Lane wrote:
> I hadn't looked at the patch yet, but ... mcxt.c? How is that recursive?
> Even if there is some path that recurses through that, wouldn't the
> check be better placed in a less-hot part of the loop?
In that thread Egor Chindyaskin showed proofs for stack overflow in all the
functions, that the fixes were proposed for. For example:
#MemoryContextStatsInternal
(n=1000000; printf "BEGIN;"; for ((i=1;i<=$n;i++)); do printf "SAVEPOINT s$i;"; done; printf "SELECT
pg_log_backend_memory_contexts(pg_backend_pid())") | psql >/dev/null
Though maybe for some of those functions less-hot places could be found to
check the stack.
Best regards,
Alexander
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-bugs@postgresql.org
Cc: exclusion@gmail.com, tgl@sss.pgh.pa.us, michael@paquier.xyz, zuming.jiang@inf.ethz.ch, pgsql-bugs@lists.postgresql.org, kyzevan23@mail.ru
Subject: Re: BUG #17995: Segmentation fault caused by UPDATE statement
In-Reply-To: <916440ee-5c84-abce-e2c8-562dc5775404@gmail.com>
* 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