Re: [BUGS] [CHECKER] 4 memory leaks in Postgresql 7.4.2

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [BUGS] [CHECKER] 4 memory leaks in Postgresql 7.4.2
Date: 2004-07-05 21:30:21
Message-ID: 20040705213021.GC26929@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

On Mon, Jul 05, 2004 at 05:13:23PM -0400, Bruce Momjian wrote:
> Alvaro Herrera wrote:
> > On Sun, May 02, 2004 at 07:50:46PM -0400, Tom Lane wrote:
> >
> > > It's entirely likely that ecpg's derivative of the backend's datetime
> > > modules contains lots and lots of memory leaks, since AFAIK the palloc
> > > infrastructure is not there in the ecpg environment :-(.
> >
> > I wonder why is this? Is there some limitation to using palloc outside
> > the backend itself? I ask because I have considered using it outside
> > Postgres several times (a consideration that has never materialized
> > yet), and I wonder if it needs something special to work.
>
> The semantics of palloc is that most stuff is freed on statement
> completion. In most cases, interfaces need different semantics so we
> haven't seen much need for making something like palloc available to
> clients. I can see ecpg using it in a few cases, and libpq too, but
> probably not enough to make it worthwhile.

Yes, I understand that part -- what I was talking about was not using
the code in the Pg interfaces, but in another software project which
also consists of a daemon that has several well defined "durations" of
objects. In that (as of yet unwritten) code, palloc would fit very
well. But does palloc depend on some other part of the Postgres code?

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"El Maquinismo fue proscrito so pena de cosquilleo hasta la muerte"
(Ijon Tichy en Viajes, Stanislaw Lem)

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2004-07-05 21:35:22 Re: [BUGS] [CHECKER] 4 memory leaks in Postgresql 7.4.2
Previous Message Bruce Momjian 2004-07-05 21:13:23 Re: [BUGS] [CHECKER] 4 memory leaks in Postgresql 7.4.2

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-07-05 21:30:56 Re: Recovery Features
Previous Message Jeroen T. Vermeulen 2004-07-05 21:17:27 Re: subtransactions and FETCH behaviour (was Re: PREPARE and transactions)