]> granicus.if.org Git - postgresql/commit
Clean up properly error_context_stack in autovacuum worker on exception
authorMichael Paquier <michael@paquier.xyz>
Wed, 23 Oct 2019 01:26:16 +0000 (10:26 +0900)
committerMichael Paquier <michael@paquier.xyz>
Wed, 23 Oct 2019 01:26:16 +0000 (10:26 +0900)
commit56820c714a3997163e73ba65396c2481be505c18
tree41489ec05f6ff5f5d2075a4f26ef80b16c5ccccf
parent185253ab847b95c793e3bae861611ae07a06d7c4
Clean up properly error_context_stack in autovacuum worker on exception

Any callback set would have no meaning in the context of an exception.
As an autovacuum worker exits quickly in this context, this could be
only an issue within EmitErrorReport(), where the elog hook is for
example called.  That's unlikely to going to be a problem, but let's be
clean and consistent with other code paths handling exceptions.  This is
present since 2909419, which introduced autovacuum.

Author: Ashwin Agrawal
Reviewed-by: Tom Lane, Michael Paquier
Discussion: https://postgr.es/m/CALfoeisM+_+dgmAdAOHAu0k-ZpEHHqSSG=GRf3pKJGm8OqWX0w@mail.gmail.com
Backpatch-through: 9.4
src/backend/postmaster/autovacuum.c