Re: [BUGS] [CHECKER] 4 memory leaks in Postgresql 7.4.2 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [BUGS] [CHECKER] 4 memory leaks in Postgresql 7.4.2
Date
Msg-id 4161.1089063322@sss.pgh.pa.us
Whole thread Raw
In response to Re: [BUGS] [CHECKER] 4 memory leaks in Postgresql 7.4.2  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
List pgsql-hackers
Alvaro Herrera <alvherre@dcc.uchile.cl> writes:
> 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.

It's useless without the rest of the backend infrastructure, including
elog error recovery and a cooperative main loop.  You could certainly
reuse the code in a different application if you were willing to adopt
Postgres' memory management and error handling approaches
lock-stock-and-barrel, but I don't think you could be selective about
it.  For a library that has to work inside a not-so-cooperative
application, the idea is a nonstarter.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: [BUGS] [CHECKER] 4 memory leaks in Postgresql 7.4.2
Next
From: Tom Lane
Date:
Subject: Re: Point in Time Recovery