pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Greg Stark <gsstark@mit.edu>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: P.N.Guru Prasad <pnguruji@yahoo.com>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: Memory leak!!
Date: 12 Apr 2003 11:10:42 -0400
Message-ID: <87ptnriwel.fsf@stark.dyndns.tv> (raw)
In-Reply-To: <4468.1049864296@sss.pgh.pa.us>
References: <Pine.LNX.4.44.0304081322260.1571-100000@MainServer.bksys.co.in>
	<4468.1049864296@sss.pgh.pa.us>

Tom Lane <tgl@sss.pgh.pa.us> writes:

> "P.N.Guru Prasad" <pnguruji@yahoo.com> writes:
> > while (1) {
> >   print "sql executed and returned :", $Dbh->prepare("select user_id from
> > users limit 1")->execute, "\n"; 
> > }
> 
> I'm not a DBI user, but I'd kinda expect that executing a query would
> result in an object holding the results from that query.  Don't you need
> to do something to close/delete the result objects you're generating?

Perl reference counts these objects so that shouldn't be a problem.

You could be sure by using Devel::LeakTrace or Devel::Leak or something like
that. But I suspect they won't find anything because I suspect the problem is
in the DBD::pg driver or libpq at the C level.

--
greg




view thread (6+ messages)

Message-ID: <87ptnriwel.fsf@stark.dyndns.tv>
Permalink:  ../87ptnriwel.fsf@stark.dyndns.tv/
Also on:    postgresql.org/message-id/87ptnriwel.fsf@stark.dyndns.tv

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: gsstark@mit.edu, tgl@sss.pgh.pa.us, pnguruji@yahoo.com
  Subject: Re: Memory leak!!
  In-Reply-To: <87ptnriwel.fsf@stark.dyndns.tv>

* 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