46#ifndef HAVE__BUILTIN_FRAME_ADDRESS
58#ifdef HAVE__BUILTIN_FRAME_ADDRESS
100 (
errcode(ERRCODE_STATEMENT_TOO_COMPLEX),
101 errmsg(
"stack depth limit exceeded"),
102 errhint(
"Increase the configuration parameter \"max_stack_depth\" (currently %dkB), "
103 "after ensuring the platform's stack depth limit is adequate.",
123 stack_depth = -stack_depth;
144 ssize_t newval_bytes = *
newval * (ssize_t) 1024;
151 GUC_check_errhint(
"Increase the platform's stack depth limit via \"ulimit -s\" or local equivalent.");
161 ssize_t newval_bytes =
newval * (ssize_t) 1024;
178#if defined(HAVE_GETRLIMIT)
179 static ssize_t
val = 0;
186 if (getrlimit(RLIMIT_STACK, &rlim) < 0)
188 else if (rlim.rlim_cur == RLIM_INFINITY)
191 else if (rlim.rlim_cur >= SSIZE_MAX)
199 return WIN32_STACK_RLIMIT;
int errhint(const char *fmt,...)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
#define GUC_check_errdetail
#define GUC_check_errhint
static rewind_source * source
void restore_stack_base(pg_stack_base_t base)
ssize_t get_stack_depth_rlimit(void)
bool check_max_stack_depth(int *newval, void **extra, GucSource source)
bool stack_is_too_deep(void)
void assign_max_stack_depth(int newval, void *extra)
static char * stack_base_ptr
static ssize_t max_stack_depth_bytes
void check_stack_depth(void)
pg_stack_base_t set_stack_base(void)