Re: BUG #6061: Progresql.exe memory usage using HOLD cursor.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Yann" <yann(dot)delorme(at)esker(dot)fr>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #6061: Progresql.exe memory usage using HOLD cursor.
Date: 2011-06-15 16:43:21
Message-ID: 12398.1308156201@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Yann" <yann(dot)delorme(at)esker(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Sebastian 2011-06-15 19:22:16 BUG #6062: psql terminates on auto-complete
Previous Message Tom Lane 2011-06-15 16:21:59 Re: BUG #6060: does not work -z option of pg_basebackup