1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-05 07:21:24 +03:00
Files
postgres/src/backend
Tom Lane c91963da13 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
2024-12-17 12:08:42 -05:00
..
2024-10-08 10:51:20 +09:00
2024-11-28 12:01:14 +13:00
2024-12-02 13:30:07 -06:00
2024-11-28 08:27:20 +01:00
2024-06-24 13:11:27 +02:00
2024-11-28 08:27:20 +01:00
2024-12-05 07:19:37 +01:00
2024-11-28 08:27:20 +01:00
2024-12-17 14:04:55 +01:00
2024-12-17 14:04:55 +01:00
2024-06-21 08:17:23 +02:00
2024-05-14 12:57:22 +02:00