Re: invalid memory alloc request size error with commit 4b93f579
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Rushabh Lathia <rushabh.lathia@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2018-02-26T19:52:06Z
Lists: pgsql-hackers
Rushabh Lathia <rushabh.lathia@gmail.com> writes: > In ExecBRUpdateTriggers(), we need to add a check that if trigtuple is same > as newtuple, then we don't require to free the trigtuple. Hm. Seems like this is a very old bug: it's always been legal for a trigger to return the "old" tuple if it felt like it, even if plpgsql didn't happen to exercise that case. Because of that angle, I'm not really happy with using plpgsql as part of the test case. The bug ought to be repaired in the back branches too, but this test will prove little in the back branches. Moreover, if somebody were to rejigger plpgsql again, the test might stop proving anything at all. I wonder whether it is worth creating a C trigger function (probably in regress.c) specifically to exercise this situation. If not, I'm inclined not to bother with adding a test case. regards, tom lane
Commits
-
Prevent dangling-pointer access when update trigger returns old tuple.
- 25b692568f42 11.0 landed
- b45f821e2226 10.4 landed
- 9bc33ef5ece9 9.3.23 landed
- 5ccb77586955 9.4.18 landed
- 2ee44e10d44b 9.5.13 landed
- 06f47297e2b0 9.6.9 landed
-
Improve regression test coverage of regress.c.
- be42eb9d624c 11.0 landed
-
Remove unused functions in regress.c.
- db3af9feb19f 11.0 landed
-
Make plpgsql use its DTYPE_REC code paths for composite-type variables.
- 4b93f57999a2 11.0 cited
-
This is part #1 for of the DEFERRED CONSTRAINT TRIGGER support.
- 1547ee017c89 7.1.1 cited