Re: hung postmaster when client machine dies? - Mailing list pgsql-admin

From Jeff
Subject Re: hung postmaster when client machine dies?
Date
Msg-id 20040130101807.476528cc.threshar@torgo.978.org
Whole thread Raw
In response to hung postmaster when client machine dies?  (Mark Harrison <mh@pixar.com>)
Responses Re: hung postmaster when client machine dies?
List pgsql-admin
On Thu, 29 Jan 2004 17:00:27 -0800
Mark Harrison <mh@pixar.com> wrote:

> We observed that there was postmaster connected to the ip address
> of the downed machine with an "in transaction" status.  Killing
> that processes unblocked the other processes.
>
> Is this expected behavior?  Was postgres simply waiting for
> a failure from the TCP/IP layer?
>

When a machine simply "goes away" (crashed, unplugged) no packets are
sent indicating the socket has closed so PG doesn't know the socket is
closed and cannot rollback the transaction. (This is true of any
tcp-based protocol).

If that connection had a transaction open it'll likely have rows locked.
Killing PG caused it to rollback that transaction freeing those locks.
Eventually PG would have found out the socket was dead.  Most likely if
it tried to write to it.

--
Jeff Trout <jeff@jefftrout.com>
http://www.jefftrout.com/
http://www.stuarthamm.net/

pgsql-admin by date:

Previous
From: Trevor Astrope
Date:
Subject: Veritas Filesystem
Next
From: Larry Rosenman
Date:
Subject: Re: Veritas Filesystem