Re: Missing error_context_stack = NULL in AutoVacWorkerMain()
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Ashwin Agrawal <aagrawal@pivotal.io>, PostgreSQL mailing lists <pgsql-hackers@postgresql.org>, Paul Guo <paulguo@gmail.com>
Date: 2019-10-23T01:31:23Z
Lists: pgsql-hackers
On Mon, Oct 21, 2019 at 12:53:27AM -0400, Tom Lane wrote: > Oh --- looking closer, proc_exit itself will clear error_context_stack > before doing much. So a problem would only occur if we suffered an error > during EmitErrorReport, which seems somewhat unlikely. Still, it's bad > that this code isn't like all the others. There's certainly no downside > to clearing the pointer. Good point about index predicates/expressions. There is the elog() hook as well in the area, and it's hard to predict how people use that. So applied and back-patched down 9.4. -- Michael
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