I am not sure of your exact situation, but I am using a windows client with putty setting up an SSH tunnel to get through the firewall, one of the options on putty allows you to set a keep alive message every XX seconds. I have kept this connection up for days without problems...
Jim ---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives? http://archives.postgresql.org