Re: Confused coding in PLy_traceback()
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-hackers@lists.postgresql.org
Date: 2025-06-01T19:05:37Z
Lists: pgsql-hackers
I wrote: > So I propose the attached. For ease of review, I've not re-indented > the code that needs to move inside PG_TRY blocks. Also, I dropped the > logic about pfree'ing the string buffers in PLy_elog_impl's PG_FINALLY > block: that doesn't seem necessary, and continuing to do it would > require making those things volatile which is notationally messy. Pushed. After sleeping on it I decided that removing the pfree's would be a poor tradeoff, as it's not clear how long those allocations might survive otherwise. The extra "volatile" markers for "xmsg" and "tbmsg" aren't that big a deal. Trying to mark "emsg" as volatile would be problematic because none of the StringInfo routines are set up to allow that, but it shouldn't be a problem because that struct will surely be on the stack. regards, tom lane
Commits
-
Run pgindent on the previous commit.
- ecc8fd2b7763 16.10 landed
- d4556f592eff 14.19 landed
- b898bb2a79ae 15.14 landed
- 93aca1246168 13.22 landed
- 6f724fcf8136 17.6 landed
- 4672b6223910 18.0 landed
-
Fix edge-case resource leaks in PL/Python error reporting.
- c6f7f11d8f4c 18.0 landed
- b56a92651ad4 15.14 landed
- 7559a16e2313 17.6 landed
- 5c7fd5976284 16.10 landed
- 31a3a15fa49d 14.19 landed
- 1c78d5553150 13.22 landed