Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane2024-12-17 17:08:39 +0000
committerTom Lane2024-12-17 17:08:42 +0000
commitc91963da1302e8dd490bde115f3956f7d2f1258d (patch)
treebd1f6e3c4319e2efd4382ceb59e9e44486033470 /src/backend/regex
parent957ba9ff14066782a42ebb974913b2fc616c99e1 (diff)
Set the stack_base_ptr in main(), not in random other places.
Previously we did this in PostmasterMain() and InitPostmasterChild(), which meant that stack depth checking was disabled in non-postmaster server processes, for instance in single-user mode. That seems like a fairly bad idea, since there's no a-priori restriction on the complexity of queries we will run in single-user mode. Moreover, this led to not having quite the same stack depth limit in all processes, which likely has no real-world effect but it offends my inner neatnik. Setting the depth in main() guarantees that check_stack_depth() is armed and has a consistent interpretation of stack depth in all forms of server processes. While at it, move the code associated with checking the stack depth out of tcop/postgres.c (which was never a great home for it) into a new file src/backend/utils/misc/stack_depth.c. Discussion: https://postgr.es/m/2081982.1734393311@sss.pgh.pa.us
Diffstat (limited to 'src/backend/regex')
0 files changed, 0 insertions, 0 deletions