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

Re: memory leak while using cursors

From: Craig Schlenter <craig(at)webtelecoms(dot)co(dot)za>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: memory leak while using cursors
Date: 2001-02-11 18:30:04
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
On Sun, Feb 11, 2001 at 12:59:16PM -0500, Tom Lane wrote:
> pgsql-bugs(at)postgresql(dot)org writes:
> > memory leak while using cursors
> > DECLARE BOB CURSOR FOR select date_part('epoch', call_time), date_part('hour', call_time), date_part('minute', call_time), date_part('dow', call_time), * from call_jan where call_time >= '2000/12/16 00:00:00.000' and call_time < '2001/01/21 00:00:00.000'  FOR READ ONLY;
> The date_part function calls will each leak a few bytes of memory that
> doesn't get reclaimed till end of query (= cursor close, in this case).
> This is fixed for 7.1 but there's no fix for older versions.

Aha! Thank you!!!! It didn't even occur to me that the query itself might
have been causing the problems ...

I'll probably just grab the call_time field and do the conversions
in my perl code to get the date_part fields until 7.1 is released.

Thank you again!!!!!


In response to

pgsql-bugs by date

Next:From: pgsql-bugsDate: 2001-02-12 12:41:35
Subject: PostgrSQL 70 under NT4.0 start postmaster -i & failes
Previous:From: Tom LaneDate: 2001-02-11 17:59:16
Subject: Re: memory leak while using cursors

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