"Delao, Darryl W" <ddelao@ou.edu> writes:
> I will have anywhere from 5 to 7 of these going at any given time. However
> most say TIME_WAIT instead of established.
TIME_WAIT is a closed connection; the kernel is only remembering it for
a few seconds in case the other end requests a retransmission of the
last few outgoing bytes. This is not blocking you from creating new
sessions.
Better ways to keep track of active database sessions are grepping the
output of "ps" for postgres processes, or watching the pg_stat_activity
system view.
> Also, is there a way to make the TIME_WAIT status shorter.
Not without violating the TCP specs.
regards, tom lane