From: Tom Lane <tgl@sss.pgh.pa.us>
To: Yann <yann.delorme@esker.fr>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #6061: Progresql.exe memory usage using HOLD cursor.
Date: Wed, 15 Jun 2011 12:43:21 -0400
Message-ID: <12398.1308156201@sss.pgh.pa.us> (raw)
In-Reply-To: <201106151300.p5FD0eH9036477@wwwmaster.postgresql.org>
References: <201106151300.p5FD0eH9036477@wwwmaster.postgresql.org>
"Yann" <yann.delorme@esker.fr> writes:
> The issue is that in this case all rows are store in memory instead of file
> in the process postgresql.exe
> I think the issue is in the file tuplestore.c.
> When a tuple is added the function static void
> tuplestore_puttuple_common(Tuplestorestate *state, void *tuple), USEMEM is
> not called with tuple size.
Hmm ... yeah, I think there's a leak there.
> I think that, after adding the tuple in the array, a call to USEMEM should
> be done.
No, the callers of tuplestore_puttuple_common are supposed to do that.
But it looks like tuplestore_putvalues() forgot to do so. So data loads
that go through that particular API would miss incrementing the space
counter.
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, yann.delorme@esker.fr
Subject: Re: BUG #6061: Progresql.exe memory usage using HOLD cursor.
In-Reply-To: <12398.1308156201@sss.pgh.pa.us>
References: <201106151300.p5FD0eH9036477@wwwmaster.postgresql.org> <12398.1308156201@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