Re: WIP Incremental JSON Parser - Mailing list pgsql-hackers

From Jacob Champion
Subject Re: WIP Incremental JSON Parser
Date
Msg-id CAOYmi+kQ1kB16_ocQxCQrzHuKK=dyVPcM7+wAUgpys5EUnWpjw@mail.gmail.com
Whole thread Raw
In response to Re: WIP Incremental JSON Parser  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: WIP Incremental JSON Parser
Re: WIP Incremental JSON Parser
List pgsql-hackers
On Mon, Mar 25, 2024 at 4:02 PM Andrew Dunstan <andrew@dunslane.net> wrote:
> Well, what's the alternative? The current parser doesn't check stack depth in frontend code. Presumably it too will
eventuallyjust run out of memory, possibly rather sooner as the stack frames could  be more expensive than the
incrementalparser stack extensions. 

Stack size should be pretty limited, at least on the platforms I'm
familiar with. So yeah, the recursive descent will segfault pretty
quickly, but it won't repalloc() an unbounded amount of heap space.
The alternative would just be to go back to a hardcoded limit in the
short term, I think.

--Jacob



pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: WIP Incremental JSON Parser
Next
From: Andrew Dunstan
Date:
Subject: Re: session username in default psql prompt?