71#define MAX_ON_EXITS 20
108 elog(
PANIC,
"proc_exit() called in child process");
113#ifdef PROFILE_PID_DIR
137 char gprofDirName[32];
140 snprintf(gprofDirName, 32,
"gprof/avworker");
142 snprintf(gprofDirName, 32,
"gprof/%d", (
int) getpid());
200 elog(
DEBUG3,
"proc_exit(%d): %d callbacks to make",
240 elog(
DEBUG3,
"shmem_exit(%d): %d before_shmem_exit callbacks to make",
273 elog(
DEBUG3,
"shmem_exit(%d): %d on_shmem_exit callbacks to make",
313 (
errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
341 (
errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
369 (
errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
402 elog(
ERROR,
"before_shmem_exit callback (%p,0x%llx) is not the latest entry",
435 elog(
FATAL,
"before_shmem_exit has been called prematurely");
437 elog(
FATAL,
"on_shmem_exit has been called prematurely");
void dsm_backend_shutdown(void)
void reset_on_dsm_detach(void)
int errmsg_internal(const char *fmt,...)
ErrorContextCallback * error_context_stack
int errcode(int sqlerrcode)
#define ereport(elevel,...)
volatile sig_atomic_t InterruptPending
volatile uint32 InterruptHoldoffCount
volatile uint32 CritSectionCount
volatile sig_atomic_t QueryCancelPending
volatile sig_atomic_t ProcDiePending
void check_on_shmem_exit_lists_are_empty(void)
void on_shmem_exit(pg_on_exit_callback function, Datum arg)
static bool atexit_callback_setup
bool shmem_exit_inprogress
void on_proc_exit(pg_on_exit_callback function, Datum arg)
static struct ONEXIT on_proc_exit_list[MAX_ON_EXITS]
void cancel_before_shmem_exit(pg_on_exit_callback function, Datum arg)
static void atexit_callback(void)
bool proc_exit_inprogress
static int before_shmem_exit_index
void shmem_exit(int code)
void before_shmem_exit(pg_on_exit_callback function, Datum arg)
static int on_shmem_exit_index
static struct ONEXIT before_shmem_exit_list[MAX_ON_EXITS]
static int on_proc_exit_index
static struct ONEXIT on_shmem_exit_list[MAX_ON_EXITS]
static void proc_exit_prepare(int code)
void(* pg_on_exit_callback)(int code, Datum arg)
#define AmAutoVacuumWorkerProcess()
on_exit_nicely_callback function
const char * debug_query_string
pg_on_exit_callback function