From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: pgsql-bugs@lists.postgresql.org
Cc: amdmi3@amdmi3.ru
Subject: Re: BUG #15592: Memory overuse with subquery containing unnest() and set operations (11.x regression)
Date: Mon, 14 Jan 2019 11:57:55 -0500
Message-ID: <27649.1547485075@sss.pgh.pa.us> (raw)
In-Reply-To: <27372.1547484627@sss.pgh.pa.us>
References: <15592-cc5729f9ba02e31c@postgresql.org>
<26375.1547483080@sss.pgh.pa.us>
<3935CFAF-8FD4-459E-B13F-67DFEE852028@anarazel.de>
<27372.1547484627@sss.pgh.pa.us>
I wrote:
> Andres Freund <andres@anarazel.de> writes:
>> Think I know where the problem is - let me have a coffee and check? I think I might have a good lying around...
> I had just determined that the extra context was added by bf6c614a2,
The short answer here is that this addition to BuildTupleHashTable:
hashtable->exprcontext = CreateExprContext(parent->state);
allocates memory that is not freed by freeing the hashtable's tablecxt,
breaking the API for grouping hashtables.
Why does a hashtable need its own exprcontext now when it didn't before?
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, andres@anarazel.de, amdmi3@amdmi3.ru
Subject: Re: BUG #15592: Memory overuse with subquery containing unnest() and set operations (11.x regression)
In-Reply-To: <27649.1547485075@sss.pgh.pa.us>
References: <15592-cc5729f9ba02e31c@postgresql.org> <26375.1547483080@sss.pgh.pa.us> <3935CFAF-8FD4-459E-B13F-67DFEE852028@anarazel.de> <27372.1547484627@sss.pgh.pa.us> <27649.1547485075@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox