Get status of connection (C)

From: zilch(at)home(dot)se
To: pgsql-general(at)postgresql(dot)org
Subject: Get status of connection (C)
Date: 2001-05-29 09:46:22
Message-ID: 20010529114622.A12839@loony
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


I'm writing a pool manager to manage x connections to a pgsql postmaster.

The getConnection method has to check if the connection is still valid,
and try to reconnect if it ain't.

Do you guys have a good way of doing this?

Can I use PQstatus?

Should I make a little runCommand on it to try it out? Then what command?

If it's bad, should I run a PQfinish on it before reconnecting or not?

Thank you plenty!

---
Daniel Akerud

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jason Tishler 2001-05-29 13:08:09 Re: PostgreSQL on Cygwin on Win98
Previous Message Karen Ellrick 2001-05-29 09:39:19 Problems with new data location