From: | Ashwin Agrawal <aagrawal(at)pivotal(dot)io> |
---|---|
To: | PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>, Paul Guo <paulguo(at)gmail(dot)com> |
Subject: | Missing error_context_stack = NULL in AutoVacWorkerMain() |
Date: | 2019-10-19 00:55:32 |
Message-ID: | CALfoeisM+_+dgmAdAOHAu0k-ZpEHHqSSG=GRf3pKJGm8OqWX0w@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
I am not sure if this causes any potential problems or not, but for
consistency of code seems we are missing below. All other places in code
where sigsetjmp() exists for top level handling has error_context_stack set
to NULL.
diff --git a/src/backend/postmaster/autovacuum.c
b/src/backend/postmaster/autovacuum.c
index 073f313337..b06d0ad058 100644
--- a/src/backend/postmaster/autovacuum.c
+++ b/src/backend/postmaster/autovacuum.c
@@ -1558,6 +1558,9 @@ AutoVacWorkerMain(int argc, char *argv[])
*/
if (sigsetjmp(local_sigjmp_buf, 1) != 0)
{
+ /* Since not using PG_TRY, must reset error stack by hand */
+ error_context_stack = NULL;
+
/* Prevents interrupts while cleaning up */
HOLD_INTERRUPTS();
This was spotted by Paul during code inspection.
From | Date | Subject | |
---|---|---|---|
Next Message | Ariadne Conill | 2019-10-19 02:14:09 | Re: jsonb_set() strictness considered harmful to data |
Previous Message | Adrian Klaver | 2019-10-19 00:04:21 | Re: jsonb_set() strictness considered harmful to data |