"Didier Gasser-Morlay" <didiergm(at)gmail(dot)com> writes:
> So my question is what makes PostgreSQL realise that a connection is
> dead ? when will it drop it and free the connection ?
It'll drop it when the kernel tells it the connection is dead.
Standard TCP timeouts are measured in hours, though. You might
be able to get a shorter timeout to be applied by fooling with
the "keepalive" parameters, if those can be adjusted on your platform.
regards, tom lane