On Mon, Feb 14, 2011 at 7:16 PM, Jan Urbański <wulczer(at)wulczer(dot)org> wrote:
> Actually, libpq recently got a feature called PQPing that just checks
> the state of the connection. So you can have timeouts on your queries
> and periodic PQPings when you're not running anything. Reminds me:
> psycopg2 needs to support PQPing, but that should be easy.
That's tasty. It's too early now to include something only available
in PG 9.1, but a psycopg2.ping(dsn_or_params) would actually be
useful.
-- Daniele