Re: Pooling Connections with libpq - Mailing list pgsql-general

From Alfred Perlstein
Subject Re: Pooling Connections with libpq
Date
Msg-id 20010222154531.H29126@fw.wintelcom.net
Whole thread Raw
In response to Pooling Connections with libpq  (Shaw Terwilliger <sterwill@sourcegear.com>)
Responses Re: Pooling Connections with libpq  (Shaw Terwilliger <sterwill@sourcegear.com>)
List pgsql-general
* Shaw Terwilliger <sterwill@sourcegear.com> [010222 14:42] wrote:
> In my application, I'm doing my own pooling of connections to PostgreSQL
> for sharing between threads.  I'm using libpq for all database access.
> Only one thread at a time can use a connection.
>
> Besides freeing all query results, do I have to do anything else to ensure
> my application (through libpq) and the backends don't leak RAM after long
> periods of use?  I'm not using temporary tables, I'm only doing SELECTs on
> these connections, reading, and then freeing the results.

As a general safety precaution I would close a connection after a
timeout or N uses.

--
-Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org]

pgsql-general by date:

Previous
From: Ian Lance Taylor
Date:
Subject: Re: undefined references
Next
From: Shaw Terwilliger
Date:
Subject: Re: Pooling Connections with libpq