Re: Missing error_context_stack = NULL in AutoVacWorkerMain()

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Missing error_context_stack = NULL in AutoVacWorkerMain()
Дата
Msg-id 20191021045652.GA2609@paquier.xyz
обсуждение исходный текст
Ответ на Re: Missing error_context_stack = NULL in AutoVacWorkerMain()  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Missing error_context_stack = NULL in AutoVacWorkerMain()  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Mon, Oct 21, 2019 at 12:47:40AM -0400, Tom Lane wrote:
> This seems like a real and possibly serious bug to me.  Backend sigsetjmp
> callers *must* clear error_context_stack (or restore it to a previous
> value), because if it isn't NULL it's surely pointing at garbage, ie a
> local variable that's no longer part of the valid stack.

Sure.  From my recollection of memories we never set it in autovacuum
code paths (including index entry deletions), so I don't think that we
have an actual live bug here.

> The issue might be argued to be insignificant because the autovacuum
> worker is just going to do proc_exit anyway.  But if it encountered
> another error during proc_exit, elog.c might try to invoke error
> callbacks using garbage callback data.
>
> In short, I think we'd better back-patch too.

Okay, no objections to back-patch.
--
Michael

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Missing error_context_stack = NULL in AutoVacWorkerMain()
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Missing error_context_stack = NULL in AutoVacWorkerMain()