Re: [GENERAL] persistent db connections/resiliency

2000-10-09 Thread Tom Lane
Robert Boyd <[EMAIL PROTECTED]> writes: > Should I get connection status before every query, and if bad, attempt > reconnect? Waste of time, assuming you are thinking of PQstatus(); it just returns a field from the PGconn struct showing the last known state. I'd suggest that *upon error* you che

[GENERAL] persistent db connections/resiliency

2000-10-09 Thread Robert Boyd
I'm tasked with handling database connection failures elegantly--reconnecting after failure. I'm wondering how other people have approached this problem. Should I get connection status before every query, and if bad, attempt reconnect? Any help is appreciated. - Rob