diff options
Diffstat (limited to 'src/backend/jit/llvm/llvmjit_error.cpp')
-rw-r--r-- | src/backend/jit/llvm/llvmjit_error.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/backend/jit/llvm/llvmjit_error.cpp b/src/backend/jit/llvm/llvmjit_error.cpp index 26bc828875e..daefb3e1fd9 100644 --- a/src/backend/jit/llvm/llvmjit_error.cpp +++ b/src/backend/jit/llvm/llvmjit_error.cpp @@ -84,6 +84,16 @@ llvm_leave_fatal_on_oom(void) } /* + * Are we currently in an fatal-on-oom section? Useful to skip cleanup in case + * of errors. + */ +bool +llvm_in_fatal_on_oom(void) +{ + return fatal_new_handler_depth > 0; +} + +/* * Reset fatal error handling. This should only be called in error recovery * loops like PostgresMain()'s. */ |