Update in check_max_stack_depth

From: Daria Shanina <vilensipkdm(at)gmail(dot)com>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Update in check_max_stack_depth
Date: 2026-08-06 13:31:38
Message-ID: CAMp4U1fyRtHON9SxmmqsNX8RCaqQP3rOqF37amhG0ZLit6LFbA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi all,
when I was testing the work in low-memory conditions, I setted ulimit -s
512 and received an error message:

LOG: invalid value for parameter "max_stack_depth": 100
DETAIL: "max_stack_depth" must not exceed 0kB.
HINT: Increase the platform's stack depth limit via "ulimit -s" or local
equivalent.
FATAL: failed to initialize max_stack_depth to 100

With lower stack values, the figure was negative

DETAIL: "max_stack_depth" must not exceed -256kB at ulimit -s 256

It appears because stack_rlimit is less than or equal to STACK_DEPTH_SLOP,
and I added a check. Could you take a look?

Best regards,
Daria Shanina

--
С уважением,
Шанина Дарья Александровна

Attachment Content-Type Size
update_check_max_stack_depth.patch text/x-patch 906 bytes

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Bram van der Vos 2026-08-06 14:11:21 file corruption goes undetected
Previous Message li kid 2026-08-06 12:06:05 Re: BUG #19555: TRAP: failed Assert (ent->cmin == change->data.tuplecid.cmin) on logical replication