Обсуждение: hanging processes
I think this is windows specific but it might now be. With a win32 server & XP clients, if the client is killed with a hard reset i.e. pull out power cord, the server does not recognize that the connection has been broken in pg_stat_activity and does not clean up various things such as user_locks and presumably entries in pg_listener. A manual kill via pg_ctl is required from that point. With any 'soft' method of killing the client up to and including killing the client application process from the client task manager and everything is normal in that the database logs a unexpected connection closure and everything is cleaned up. Is this normal? Merlin
"Merlin Moncure" <merlin.moncure@rcsonline.com> writes: > With a win32 server & XP clients, if the client is killed with a hard > reset i.e. pull out power cord, the server does not recognize that the > connection has been broken in pg_stat_activity and does not clean up > various things such as user_locks and presumably entries in pg_listener. > A manual kill via pg_ctl is required from that point. Did you wait for the TCP KEEPALIVE timeout interval? regards, tom lane
> > With a win32 server & XP clients, if the client is killed > with a hard > > reset i.e. pull out power cord, the server does not > recognize that the > > connection has been broken in pg_stat_activity and does not > clean up > > various things such as user_locks and presumably entries in > pg_listener. > > A manual kill via pg_ctl is required from that point. > > Did you wait for the TCP KEEPALIVE timeout interval? Which, if you didn't know it already, is two hours on Windows. //Magnus
> "Merlin Moncure" <merlin.moncure@rcsonline.com> writes: > > With a win32 server & XP clients, if the client is killed with a hard > > reset i.e. pull out power cord, the server does not recognize that the > > connection has been broken in pg_stat_activity and does not clean up > > various things such as user_locks and presumably entries in pg_listener. > > A manual kill via pg_ctl is required from that point. > > Did you wait for the TCP KEEPALIVE timeout interval? Apparently not. Timeout on windows is 2 hours which is pretty standard I guess. I'm going to research into tweaking it down. Merlin