Re: Pooling Connections with libpq

From: Alfred Perlstein <bright(at)wintelcom(dot)net>
To: Shaw Terwilliger <sterwill(at)sourcegear(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Pooling Connections with libpq
Date: 2001-02-22 23:45:31
Message-ID: 20010222154531.H29126@fw.wintelcom.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

* Shaw Terwilliger <sterwill(at)sourcegear(dot)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(at)wintelcom(dot)net|alfred(at)freebsd(dot)org]

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Shaw Terwilliger 2001-02-22 23:49:46 Re: Pooling Connections with libpq
Previous Message Ian Lance Taylor 2001-02-22 23:36:06 Re: undefined references