"Donald Fraser" <demolish@cwgsy.net> writes:
> As you can see there still existed the connection to the database that I ha=
> d established from the Java app (from my computer 192.168.100.22).
FWIW, that backend will eventually time out and go away. The delay is
determined by whatever the TCP_KEEPALIVE code in your kernel does before
reporting the connection to be lost. It's probably an hour or so, if
the TCP code is RFC-compliant. I would not necessarily consider it a
good idea to shorten that delay; you'd be giving up robustness against
transient communication problems if you do.
regards, tom lane