Network problems like this are usually better solved somewhere other than the application, since their impact usually affects more than just one application.
I totally agree on that. Additionally, when we implement some kind of reconnect we must be quite careful about it, so that a connection that's really terminated doesn't cause a bunch of unnecessary and unwanted retries (resulting in 10 minutes sitting in front of your machine, waiting for it to recover).
I'd rather like to leave this to the network level. If the link is broken, there must be a reason for this: either it's intentionally, or it's faulty. Both ways need review.
Regards, Andreas
---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives?
http://archives.postgresql.org