Re: json(b)_array_elements use causes very large memory usage when also referencing entire json document

From: Andres Freund <andres(at)anarazel(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Lucas Fairchild-Madar <lucas(dot)madar(at)gmail(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: json(b)_array_elements use causes very large memory usage when also referencing entire json document
Date: 2017-10-08 21:13:11
Message-ID: 20171008211311.vrzrbelmiwvinka6@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 2017-10-08 16:27:51 -0400, Tom Lane wrote:
> Andres Freund <andres(at)anarazel(dot)de> writes:
> > On 2017-10-06 21:08:43 -0700, Andres Freund wrote:
> >> I'm kinda tempted to put this, after a bit more testing, into v10.
>
> > Any opinions on that?
>
> I think it's fine to put it in HEAD. I would not risk back-patching
> into v10. Now that we fixed the new leak, v10 is on par with the last
> umpteen years worth of tSRF behavior, and we've not had very many
> complaints about that.

WFM. Was only thinking about it, because it'd give the OP a chance to
upgrade to a supported release and get rid of the behaviour. But given
he's essentially hitting O(n^2) runtime even aftre that, just rewriting
the query is the saner option anyway...

Will make it so.

Greetings,

Andres Freund

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Peter Geoghegan 2017-10-08 22:47:53 Re: BUG #14844: Failure/Duplicate key value with ALTER DATABASE set search_path
Previous Message Tom Lane 2017-10-08 20:27:51 Re: json(b)_array_elements use causes very large memory usage when also referencing entire json document