max_stack_depth
Specifies the maximum safe depth of the server's execution stack. The ideal setting for this parameter is the actual stack size limit enforced by the kernel (as set by ulimit -s or local equivalent), less a safety margin of a megabyte or so. The safety margin is needed because the stack depth is not checked in every routine in the server, but only in key potentially-recursive routines. If this value is specified without units, it is taken as kilobytes. The default setting is two megabytes (2MB), which is conservatively small and unlikely to risk crashes. However, it might be too small to allow execution of complex functions. Only superusers and users with the appropriate SET privilege can change this setting. Setting max_stack_depth higher than the actual kernel limit will mean that a runaway recursive function can crash an individual backend process. On platforms where PostgreSQL can determine the kernel limit, the server will not allow this variable to be set to an unsafe value. However, not all platforms provide the information, so caution is recommended in selecting a value.
英文手册覆盖始于 PostgreSQL 7.4. 来源历史与运行验证各自保留独立版本边界。
当前阅读 PG 18·选择有来源记录的版本
此版本暂无所选语言的定义,以下显示原始英文内容。
- boot val
- 100
- category
- Resource Usage / Memory
- context
- superuser
- documented
- true
- enumvals
- 未知
- extra desc
- 未知
- lang
- en
- max val
- 2147483647
- metadata version
- 18
- min val
- 100
- name
- max_stack_depth
- short desc
- Sets the maximum stack depth, in kilobytes.
- source
- pg-settings-source-snapshot
- unit
- kB
- vartype
- integer
版本定义 PG 18
Specifies the maximum safe depth of the server's execution stack. The ideal setting for this parameter is the actual stack size limit enforced by the kernel (as set by ulimit -s or local equivalent), less a safety margin of a megabyte or so. The safety margin is needed because the stack depth is not checked in every routine in the server, but only in key potentially-recursive routines. If this value is specified without units, it is taken as kilobytes. The default setting is two megabytes (2MB), which is conservatively small and unlikely to risk crashes. However, it might be too small to allow execution of complex functions. Only superusers and users with the appropriate SET privilege can change this setting. Setting max_stack_depth higher than the actual kernel limit will mean that a runaway recursive function can crash an individual backend process. On platforms where PostgreSQL can determine the kernel limit, the server will not allow this variable to be set to an unsafe value. However, not all platforms provide the information, so caution is recommended in selecting a value.
比较版本
来源引用
定义来源
center · PostgreSQL 18 · english-manuals:ac88abf1b6a465c047bf42f2f3e776fd369e84e98d27d12d8753d92168d9d21d
正文语言: en · english-manuals:ac88abf1b6a465c047bf42f2f3e776fd369e84e98d27d12d8753d92168d9d21d