keepalive problem with libpg connection - Mailing list pgsql-general

From Juan Backson
Subject keepalive problem with libpg connection
Date
Msg-id 27c25bc40908110056v76a03483uf42355c5648c15b@mail.gmail.com
Whole thread Raw
Responses Re: keepalive problem with libpg connection
List pgsql-general
Hi,

I am writing my own connection pool for libpq's connection. 

My goal is to try to reduce the amount of time spent in opening and closing socket.   However, I see that Postgres would close my connection after every so often.

What is the best solution for that? Should I regularly send some "Select 1" to keep the connection alive or is there a better way to write a connection pool for libpq?


Any suggestion will be greatly appreciated.

JB

pgsql-general by date:

Previous
From: Juan Backson
Date:
Subject: Re: Need help with libpq and PQexec[RESOLVEd]
Next
From: Merlin Moncure
Date:
Subject: Re: keepalive problem with libpg connection