Re: Stack overflow issue - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Stack overflow issue
Date
Msg-id 20240105201648.dsztwhh6zcv57kso@awork3.anarazel.de
Whole thread Raw
In response to Re: Stack overflow issue  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Stack overflow issue
List pgsql-hackers
Hi,

On 2024-01-05 12:23:25 -0500, Robert Haas wrote:
> I agree that in the memory-context case it might be worth expending
> some more code to be more clever. But I probably wouldn't do that for
> MemoryContextStats(); check_stack_depth() seems fine for that one.

We run MemoryContextStats() when we fail to allocate memory, including during
abort processing after a previous error. So I think it qualifies for being
somewhat special. Thus I suspect check_stack_depth() wouldn't be a good idea -
but we could make the stack_is_too_deep() path simpler and just return in the
existing MemoryContextStatsInternal() when that's the case.

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Emit fewer vacuum records by reaping removable tuples during pruning
Next
From: Robert Haas
Date:
Subject: Re: Error "initial slot snapshot too large" in create replication slot