pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Goldner <mgoldner@agmednet.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Dave Cramer <pg@fastcrypt.com>
Cc: Michael Goldner <mike.goldner@comcast.net>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: "Hanging Connection" blocks access to table (JBossMQ)
Date: Wed, 11 Oct 2006 15:09:16 -0400
Message-ID: <C152B99C.1D17%mgoldner@agmednet.com> (raw)
In-Reply-To: <12649.1160593027@sss.pgh.pa.us>

I should have worded my response more carefully ;)

With both Jboss and Postgresql running, a "ps -ef |grep postgres" shows two
processes in an "INSERT waiting" state, one in an idle state and the
autovacuum process.

Jboss is the only application that uses the database, so I'm sure that the
processes are not for something else.

When I shutdown Jboss, the idle process disappears, but the 2 "INSERT
waiting" processes remain indefinitely.  Once I restart Postgres, everything
immediately clears and it starts again in a normal state with no blocking.

I'm going to see if I can put together a test environment to reproduce the
problem, but simulating load conditions is always tricky.  If I can produce
it, I'll be able to gather more information (strace, gdb, etc.).

Thanks,

Mike


On 10/11/06 2:57 PM, "Tom Lane" <tgl@sss.pgh.pa.us> wrote:

> Michael Goldner <mgoldner@agmednet.com> writes:
>> I shut down postgresql manually (pg_ctl restart -m immediiate) after I had
>> first stopped Jboss and waited about 30 seconds to see that the two blocking
>> connections were not closing.
> 
> Really?  "-m immediate" should boot backends off lock waits in any case
> ... and does according to my tests.  Whether Jboss notices the
> connections dropping right away might be another story.  What are you
> observing as a "not closed" connection?
> 
> I wouldn't personally use "-m immediate" for this purpose mind you.
> "-m fast" is safer and should have the same result.
> 
> regards, tom lane

-- 
Mike Goldner
Vice President Networks and Technology
AG Mednet, Inc.
The Pilot House
Lewis Wharf
Boston, MA  02110
617.854.3225 (office)
617.909.3009 (mobile)





view thread (11+ messages)  latest in thread

Message-ID: <C152B99C.1D17%mgoldner@agmednet.com>
Permalink:  ../C152B99C.1D17%25mgoldner@agmednet.com/
Also on:    postgresql.org/message-id/C152B99C.1D17%mgoldner@agmednet.com

 · 

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-jdbc@postgresql.org
  Cc: mgoldner@agmednet.com, tgl@sss.pgh.pa.us, pg@fastcrypt.com, mike.goldner@comcast.net
  Subject: Re: "Hanging Connection" blocks access to table (JBossMQ)
  In-Reply-To: <C152B99C.1D17%mgoldner@agmednet.com>
  References: <12649.1160593027@sss.pgh.pa.us> <C152B99C.1D17%mgoldner@agmednet.com>

* 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