hanging processes

View: New views
4 Messages — Rating Filter:   Alert me  

hanging processes

by Merlin Moncure :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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

Re: hanging processes

by Tom Lane-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

"Merlin Moncure" <merlin.moncure@...> 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

Parent Message unknown Re: hanging processes

by Magnus Hagander :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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

Parent Message unknown Re: hanging processes

by Merlin Moncure :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> "Merlin Moncure" <merlin.moncure@...> 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 majordomo@... so that your
       message can get through to the mailing list cleanly