hanging processes

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

hanging processes

Merlin Moncure
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

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match
Reply | Threaded
Open this post in threaded view
|

Re: hanging processes

Tom Lane-2
"Merlin Moncure" <[hidden email]> 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

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq
Reply | Threaded
Open this post in threaded view
|

Re: hanging processes

Magnus Hagander
In reply to this post by Merlin Moncure
> > 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

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match
Reply | Threaded
Open this post in threaded view
|

Re: hanging processes

Merlin Moncure
In reply to this post by Merlin Moncure
> "Merlin Moncure" <[hidden email]> 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

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to [hidden email] so that your
       message can get through to the mailing list cleanly