Re: Out-of-Memory with ROWTYPE assignment in PL/pgSQL FOR loop

From: "Bill Rugolsky Jr(dot)" <brugolsky(at)telemetry-investments(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Out-of-Memory with ROWTYPE assignment in PL/pgSQL FOR loop
Date: 2005-06-21 01:33:23
Message-ID: 20050621013323.GA13781@ti64.telemetry-investments.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, Jun 20, 2005 at 06:54:20PM -0400, Tom Lane wrote:
> "Bill Rugolsky Jr." <brugolsky(at)telemetry-investments(dot)com> writes:
> > The PL/pgSQL FOR loop in the function consume_memory() defined below
> > will consume VM on each iteration until the process hits its ulimit.
> > The problem occurs with variables of ROWTYPE; there is no unbounded
> > allocation when using simple types such as integer or varchar.
>
> Yeah, looks like I introduced a memory leak with the 8.0 changes for
> better support of rowtype variables :-(. Here's the patch.

Thank you for the quick reply; much appreciated!
Applied and tested against CVS head; that plugged the leak.

-Bill

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Robson Elias Reuter 2005-06-21 12:57:39 BUG #1724: Problemas com acentos
Previous Message Tom Lane 2005-06-20 22:54:20 Re: Out-of-Memory with ROWTYPE assignment in PL/pgSQL FOR loop