Re: BUG #17995: Segmentation fault caused by UPDATE statement
Alexander Law <exclusion@gmail.com>
From: Alexander Lakhin <exclusion@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>, Michael Paquier <michael@paquier.xyz>
Cc: zuming.jiang@inf.ethz.ch, pgsql-bugs@lists.postgresql.org,
kyzevan23@mail.ru
Date: 2023-06-26T05:00:01Z
Lists: pgsql-bugs
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
Commits
-
Check for interrupts and stack overflow in TParserGet().
- c7f33a197bf2 11.21 landed
- b6ab18a990ff 13.12 landed
- a77d90171441 15.4 landed
- 691594acd67e 16.0 landed
- 4c61afa47c61 14.9 landed
- 3b4580f5ce98 12.16 landed
-
Doc: Clarify the behavior of triggers/rules in a logical subscriber.
- f5c446e33675 16.0 cited