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");
bool IsAutoVacuumWorkerProcess(void)
elog(ERROR, "%s: %s", p2, msg)
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)
const char * debug_query_string
pg_on_exit_callback function