Re: Allow substitute allocators for PGresult. - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Allow substitute allocators for PGresult.
Date
Msg-id CA+TgmobDGGXXOYWokkJm8Tj8R0zHKzbag_cysJNLCXNdRXS97A@mail.gmail.com
Whole thread Raw
In response to Re: Allow substitute allocators for PGresult.  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Allow substitute allocators for PGresult.
List pgsql-hackers
On Sat, Nov 12, 2011 at 12:48 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> AIUI Kyotaro-san is just suggesting that the app should be able to
> provide a substitute malloc function for use in allocating PGresult
> space (and not, I think, anything else that libpq allocates internally).
> Basically this would allow PGresults to be cleaned up with methods other
> than calling PQclear on each one.  It wouldn't affect how you'd interact
> with one while you had it.  That seems like pretty much exactly what we
> want for preventing memory leaks in the backend; but is it going to be
> useful for other apps?

I think it will.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Allow substitute allocators for PGresult.
Next
From: Robert Haas
Date:
Subject: Re: Concurrent CREATE TABLE/DROP SCHEMA leaves inconsistent leftovers