From: | Sergey Burladyan <eshkinkot(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Polyakov Vladimir <vvpolyakov(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Libpq memory leak |
Date: | 2010-09-25 00:41:28 |
Message-ID: | 87tyle7iyv.fsf@home.progtech.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
> Polyakov Vladimir <vvpolyakov(at)gmail(dot)com> writes:
> > Program written in C using Libpq, which receives large files (BYTEA)
> > has a memory leak.
> > I need to free ALL of the used memory after each sql query.
I discussed this yesterday with Vladimir. I think Vladimir trying to
complain about behavior of libpq input buffer. It is never shrinking, if
i not mistaken, it is only grow.
So, for example, if you select long bytea field at start of the
connection and then select only small fields, you do not need this big
inBuffer in memory, but you are still with it during all lifetime of
this connection.
Here is example:
Attachment | Content-Type | Size |
---|---|---|
pg-test-bytea-free.c | text/x-csrc | 1.9 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | KM | 2010-09-25 01:42:39 | Listen and do something daemon |
Previous Message | Jeff Davis | 2010-09-25 00:03:26 | Re: exclude constraints with same name? |