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.

Reply via email to