Skip site navigation (1) Skip section navigation (2)

Re: Deadlock detection

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Kris Jurka <books(at)ejurka(dot)com>
Cc: Oliver Jowett <oliver(at)opencloud(dot)com>, Daniel Migowski <dmigowski(at)ikoffice(dot)de>, PostgreSQL - JDBC <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Deadlock detection
Date: 2009-06-04 21:53:33
Message-ID: 1244152413.23910.311.camel@ebony.2ndQuadrant (view raw or flat)
Thread:
Lists: pgsql-jdbc
On Mon, 2009-06-01 at 19:30 -0400, Kris Jurka wrote:

> 1) It avoids deadlocks by buffering the writes in local memory.  That's 
> great, but wasn't really the point of the thread.  Would we suggest people 
> run with antiDeadlock=true in a production environment to avoid deadlocks? 
> If so, why wouldn't it be the default.

> So it's a useful piece of code, but I'm not sure what context it should 
> really be used in.  Is anyone using this?  For what purpose?

The reason the code was written went away before the code could sensibly
be used. We removed the contention in the database by redesign rather
than by JDBC changes. Thanks to Oliver for taking the time.

Having said that, it is clear there were some issues there that are not
fully explained. It may be that it is a JDBC driver issue, but also it
may be a protocol/handling issue. Intermittent issues are hard to get a
full state on to debug, and we are left looking at spoor or wishing we
had some.

I would like to see code added to the driver for (1), or other code. My
main request is that we have some way of responding to the problems that
we know can exist. The main argument for not buffering everything would
be performance, I think. 99.9% of users are happy as is, so to act in a
way that effects them would be bad. Sometimes, a "safe mode" would be a
useful thing to be able to enable, as a way of eliminating doubt.

-- 
 Simon Riggs           www.2ndQuadrant.com
 PostgreSQL Training, Services and Support


In response to

pgsql-jdbc by date

Next:From: Thomas FinneidDate: 2009-06-05 15:48:30
Subject: Re: COPY FROM STDIN support for JDK 1.6
Previous:From: Peirong Feng (pefeng)Date: 2009-06-04 20:28:59
Subject: how to modify connection socket timeout

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group