pgsql: Clean up properly error_context_stack in autovacuum worker on ex

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Clean up properly error_context_stack in autovacuum worker on ex
Date: 2019-10-23 01:27:42
Message-ID: E1iN5R8-0003mB-Os@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Branch
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/56820c714a3997163e73ba65396c2481be505c18

Modified Files
--------------
src/backend/postmaster/autovacuum.c | 3 +++
1 file changed, 3 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2019-10-23 02:35:54 pgsql: Fix thinkos from 4f4061b for libpq integer parsing
Previous Message Michael Paquier 2019-10-22 10:05:53 Re: pgsql: Fix parsing of integer values for connection parameters in libpq