From: Amit Kapila <amit.kapila@huawei.com>
To: 'Heikki Linnakangas' <heikki.linnakangas@enterprisedb.com>
To: armando.miraglia@stud-inf.unibz.it
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #6698: sub-query with join producing out of memory in where clause
Date: Wed, 20 Jun 2012 12:03:47 +0530
Message-ID: <003801cd4eae$a63e01d0$f2ba0570$@kapila@huawei.com> (raw)
In-Reply-To: <4FE072E7.2010000@enterprisedb.com>
References: <E1Sgmoz-0002gU-No@wrigleys.postgresql.org>
<4FE072E7.2010000@enterprisedb.com>
> I'm not sure what the correct fix is. I suppose we could pfree() the old
> value before overwriting it, but I'm not sure if that's safe, or if
> there might still be references to the old value somewhere in the executor.
It will resolve the current problem but I am also not sure whether it can create
any other problem because in this function most of the work is done in per-query memory context.
One thing if we can clarify that why per-tuple memory context is not sufficient for this value
than it can be easy to conclude on solution for this problem.
Another thing I have noticed is that in function ExecScanSubPlan, the similar work is not done in
Per-query memory context, I am not sure if it is of any relevance for the problem you mentioned.
With Regards,
Amit Kapila.
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: amit.kapila@huawei.com, heikki.linnakangas@enterprisedb.com, armando.miraglia@stud-inf.unibz.it
Subject: Re: BUG #6698: sub-query with join producing out of memory in where clause
In-Reply-To: <003801cd4eae$a63e01d0$f2ba0570$@kapila@huawei.com>
References: <E1Sgmoz-0002gU-No@wrigleys.postgresql.org> <4FE072E7.2010000@enterprisedb.com> <003801cd4eae$a63e01d0$f2ba0570$@kapila@huawei.com>
* 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