Re: Missing error_context_stack = NULL in AutoVacWorkerMain()
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael@paquier.xyz>
Cc: Ashwin Agrawal <aagrawal@pivotal.io>,
PostgreSQL mailing lists <pgsql-hackers@postgresql.org>,
Paul Guo <paulguo@gmail.com>
Date: 2019-10-21T05:01:50Z
Lists: pgsql-hackers
Michael Paquier <michael@paquier.xyz> writes: > On Mon, Oct 21, 2019 at 12:47:40AM -0400, Tom Lane wrote: >> This seems like a real and possibly serious bug to me. Backend sigsetjmp >> callers *must* clear error_context_stack (or restore it to a previous >> value), because if it isn't NULL it's surely pointing at garbage, ie a >> local variable that's no longer part of the valid stack. > Sure. From my recollection of memories we never set it in autovacuum > code paths (including index entry deletions), so I don't think that we > have an actual live bug here. Uh ... what about, say, auto-analyze on an expression index? That could call user-defined PL functions and thus reach just about all of the backend. regards, tom lane
Commits
-
Clean up properly error_context_stack in autovacuum worker on exception
- 02f7f246b57e 9.4.25 landed
- ebf7b2e01bd9 9.5.20 landed
- 56820c714a39 9.6.16 landed
- 21c343b90388 10.11 landed
- 669feabfb762 11.6 landed
- 399b8d13ca5c 12.1 landed
- e3db3f829f60 13.0 landed