I wrote: > I had a thought while looking at elog.c: we could further reduce the risk > of quickdie() crashing if we make it do what elog.c does when it gets into > error recursion trouble: > error_context_stack = NULL; > debug_query_string = NULL;
On closer inspection, there's not much need to touch debug_query_string here, because elog.c only consults that for making log entries, which we're suppressing. I pushed it with just the error_context_stack reset. regards, tom lane