27 #ifdef PROFILE_PID_DIR 71 #define MAX_ON_EXITS 20 109 #ifdef PROFILE_PID_DIR 133 char gprofDirName[32];
136 snprintf(gprofDirName, 32,
"gprof/avworker");
138 snprintf(gprofDirName, 32,
"gprof/%d", (
int) getpid());
196 elog(
DEBUG3,
"proc_exit(%d): %d callbacks to make",
236 elog(
DEBUG3,
"shmem_exit(%d): %d before_shmem_exit callbacks to make",
269 elog(
DEBUG3,
"shmem_exit(%d): %d on_shmem_exit callbacks to make",
309 (
errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
337 (
errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
365 (
errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
398 elog(
ERROR,
"before_shmem_exit callback (%p,0x%llx) is not the latest entry",
399 function, (
long long) arg);
431 elog(
FATAL,
"before_shmem_exit has been called prematurely");
433 elog(
FATAL,
"on_shmem_exit has been called prematurely");
volatile uint32 InterruptHoldoffCount
volatile sig_atomic_t QueryCancelPending
void reset_on_dsm_detach(void)
static struct ONEXIT on_proc_exit_list[MAX_ON_EXITS]
void on_proc_exit(pg_on_exit_callback function, Datum arg)
static void proc_exit_prepare(int code)
int errcode(int sqlerrcode)
static int on_shmem_exit_index
void shmem_exit(int code)
ErrorContextCallback * error_context_stack
pg_on_exit_callback function
static bool atexit_callback_setup
void cancel_before_shmem_exit(pg_on_exit_callback function, Datum arg)
void on_shmem_exit(pg_on_exit_callback function, Datum arg)
void before_shmem_exit(pg_on_exit_callback function, Datum arg)
volatile uint32 CritSectionCount
bool IsAutoVacuumWorkerProcess(void)
void dsm_backend_shutdown(void)
const char * debug_query_string
static struct ONEXIT on_shmem_exit_list[MAX_ON_EXITS]
#define ereport(elevel,...)
static int on_proc_exit_index
int errmsg_internal(const char *fmt,...)
volatile sig_atomic_t ProcDiePending
bool proc_exit_inprogress
static int before_shmem_exit_index
void check_on_shmem_exit_lists_are_empty(void)
void(* pg_on_exit_callback)(int code, Datum arg)
volatile sig_atomic_t InterruptPending
bool shmem_exit_inprogress
static struct ONEXIT before_shmem_exit_list[MAX_ON_EXITS]
static void atexit_callback(void)