PostgreSQL Source Code git master
|
#include "postgres.h"
#include <limits.h>
#include <sys/resource.h>
#include "miscadmin.h"
#include "utils/guc_hooks.h"
Go to the source code of this file.
Functions | |
pg_stack_base_t | set_stack_base (void) |
void | restore_stack_base (pg_stack_base_t base) |
void | check_stack_depth (void) |
bool | stack_is_too_deep (void) |
bool | check_max_stack_depth (int *newval, void **extra, GucSource source) |
void | assign_max_stack_depth (int newval, void *extra) |
ssize_t | get_stack_depth_rlimit (void) |
Variables | |
int | max_stack_depth = 100 |
static ssize_t | max_stack_depth_bytes = 100 * (ssize_t) 1024 |
static char * | stack_base_ptr = NULL |
void assign_max_stack_depth | ( | int | newval, |
void * | extra | ||
) |
Definition at line 159 of file stack_depth.c.
References max_stack_depth_bytes, and newval.
bool check_max_stack_depth | ( | int * | newval, |
void ** | extra, | ||
GucSource | source | ||
) |
Definition at line 142 of file stack_depth.c.
References get_stack_depth_rlimit(), GUC_check_errdetail, GUC_check_errhint, newval, and STACK_DEPTH_SLOP.
void check_stack_depth | ( | void | ) |
Definition at line 95 of file stack_depth.c.
References ereport, errcode(), errhint(), errmsg(), ERROR, max_stack_depth, and stack_is_too_deep().
Referenced by _jumbleNode(), AlterTypeRecurse(), apply_scanjoin_target_to_paths(), ATAddCheckNNConstraint(), ATExecAddColumn(), ATExecAlterConstrRecurse(), ATExecDropColumn(), ATExecSetNotNull(), CheckAttributeType(), checkCond(), clean_NOT_intree(), clean_stopword_intree(), cntsize(), contains_required_value(), convertJsonbValue(), copyObjectImpl(), Cover(), create_plan_recurse(), datum_to_json_internal(), datum_to_jsonb_internal(), dofindsubquery(), dropconstraint_internal(), emit_jsp_gin_entries(), equal(), eval_const_expressions_mutator(), EventTriggerInvoke(), ExecEndNode(), ExecEvalSubPlan(), ExecInitExprRec(), ExecInitNode(), ExecMakeFunctionResultSet(), ExecProcNodeFirst(), ExecShutdownNode_walker(), execute(), executeAnyItem(), executeBoolItem(), executeItemOptUnwrapTarget(), expand_partitioned_rtentry(), expression_tree_mutator_impl(), expression_tree_walker_impl(), extract_jsp_bool_expr(), fillQT(), find_composite_type_dependencies(), find_matching_subplans_recurse(), findDependentObjects(), findoprnd(), findoprnd_recurse(), flatten_grouping_sets(), flattenJsonPathParseItem(), FreePageManagerDumpBtree(), freetree(), generate_partition_qual(), generate_partitionwise_join_paths(), get_query_def(), get_rels_with_domain(), get_rule_expr(), get_setop_query(), get_steps_using_prefix_recurse(), gistSplit(), hash_range(), hash_range_extended(), hash_record(), hash_record_extended(), hk_depth_search(), infix(), inline_set_returning_function(), int_query_opr_selec(), is_simple_union_all_recurse(), JsonbDeepContains(), lseg_inside_poly(), ltree_execute(), makepol(), maketree(), MatchText(), MultiExecProcNode(), outNode(), p_ishost(), p_isURLPath(), parse_array(), parse_object(), parseNodeString(), plainnode(), planstate_tree_walker_impl(), plperl_hash_from_tuple(), plperl_sv_to_datum(), PLy_input_setup_func(), PLy_output_setup_func(), populate_array_dim_jsonb(), populate_record_field(), printJsonPathItem(), pull_up_sublinks_jointree_recurse(), pull_up_subqueries_recurse(), QT2QTN(), QTNBinary(), QTNClearFlags(), QTNCopy(), QTNFree(), QTNodeCompare(), QTNSort(), QTNTernary(), range_cmp(), range_in(), range_out(), range_recv(), range_send(), raw_expression_tree_walker_impl(), record_cmp(), record_eq(), record_in(), record_out(), record_recv(), record_send(), recurse_set_operations(), regex_selectivity_sub(), relation_is_updatable(), resolve_special_varno(), set_append_rel_size(), setPath(), split_array(), SplitToVariants(), standard_ProcessUtility(), transformExprRecurse(), transformFromClauseItem(), transformSetOperationTree(), traverse_lacons(), try_partitionwise_join(), TS_execute_locations_recurse(), TS_execute_recurse(), TS_phrase_execute(), tsquery_opr_selec(), and tsquery_requires_match().
ssize_t get_stack_depth_rlimit | ( | void | ) |
Definition at line 176 of file stack_depth.c.
References val.
Referenced by check_max_stack_depth(), and InitializeGUCOptionsFromEnvironment().
void restore_stack_base | ( | pg_stack_base_t | base | ) |
Definition at line 77 of file stack_depth.c.
References stack_base_ptr.
pg_stack_base_t set_stack_base | ( | void | ) |
Definition at line 44 of file stack_depth.c.
References stack_base_ptr.
Referenced by main().
bool stack_is_too_deep | ( | void | ) |
Definition at line 109 of file stack_depth.c.
References max_stack_depth_bytes, and stack_base_ptr.
Referenced by check_stack_depth(), MemoryContextStatsInternal(), rstacktoodeep(), and ShowTransactionStateRec().
int max_stack_depth = 100 |
Definition at line 26 of file stack_depth.c.
Referenced by check_stack_depth().
|
static |
Definition at line 29 of file stack_depth.c.
Referenced by assign_max_stack_depth(), and stack_is_too_deep().
|
static |
Definition at line 35 of file stack_depth.c.
Referenced by restore_stack_base(), set_stack_base(), and stack_is_too_deep().