pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jeff <threshar@torgo.978.org>
To: Mark Harrison <mh@pixar.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: hung postmaster when client machine dies?
Date: Fri, 30 Jan 2004 10:18:07 -0500
Message-ID: <20040130101807.476528cc.threshar@torgo.978.org> (raw)
In-Reply-To: <4019ACAB.4010600@pixar.com>
References: <4019ACAB.4010600@pixar.com>

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/



view thread (5+ messages)  latest in thread

Message-ID: <20040130101807.476528cc.threshar@torgo.978.org>
Permalink:  ../20040130101807.476528cc.threshar@torgo.978.org/
Also on:    postgresql.org/message-id/20040130101807.476528cc.threshar@torgo.978.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: threshar@torgo.978.org, mh@pixar.com
  Subject: Re: hung postmaster when client machine dies?
  In-Reply-To: <20040130101807.476528cc.threshar@torgo.978.org>
  References: <4019ACAB.4010600@pixar.com> <20040130101807.476528cc.threshar@torgo.978.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox