Fix SIGSEGV caused by incorrect setting of error_context_stack within external_endscan
Within external_beginscan(), scan->errcontext.previous may link to local error contexts such as spierrcontext, if errors occur, abort routines call external_endscan() to set global value error_context_stack to those local error contexts whose stack are not exist anymore, so everytime elog() or ereport() are called, a SIGSEGV occurs. To avoid this, setting up and restoring error_context_stack within a single function.
Showing
想要评论请 注册 或 登录