Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-bugs by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group