Postgresql responses are slow without internet
something is doing dns lookups on your connections, check your logging settings are not logging domain names, and ensure that pg_hba.conf contains no host names (only ip addresses)  

perhaps use wireshark or tshark to check for DNS traffic on the database server and see what the lookups are.