Home > Archive > PostgreSQL JDBC > July 2005 > Exception from deadlock









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Exception from deadlock
Joseph Shraibman

2005-07-07, 9:23 am

org.postgresql.util.PSQLException: ERROR: deadlock detected

at
org.postgresql.util.PSQLException. parseServerError(PSQ
LException.java:139)
at org.postgresql.core.QueryExecutor. executeV3(QueryExecu
tor.java:152)
at org.postgresql.core.QueryExecutor. execute(QueryExecuto
r.java:100)
at org.postgresql.core.QueryExecutor. execute(QueryExecuto
r.java:43)
at
org.postgresql.jdbc1. AbstractJdbc1Stateme
nt. execute(AbstractJdbc
1Statement.java:517)
at
org.postgresql.jdbc2. AbstractJdbc2Stateme
nt. execute(AbstractJdbc
2Statement.java:50)
at
org.postgresql.jdbc1. AbstractJdbc1Stateme
nt. executeUpdate(Abstra
ctJdbc1Statement.java:273)
at
org.postgresql.jdbc1. AbstractJdbc1Stateme
nt. executeUpdate(Abstra
ctJdbc1Statement.java:259)

When I get a deadlock on psql, I get:

ERROR: deadlock detected
DETAIL: Process 12189 waits for ShareLock on transaction 3657282;
blocked by process 12109.
Process 12109 waits for ShareLock on transaction 3657280; blocked by
process 12189.


So my quesion is where did that detail information go in the jdbc driver?

I'm using postgres 7.4.7 with the jdbc driver that comes with it.
Oliver Jowett

2005-07-07, 8:26 pm

Joseph Shraibman wrote:

> So my quesion is where did that detail information go in the jdbc driver?
>
> I'm using postgres 7.4.7 with the jdbc driver that comes with it.


Can you try an 8.0-era driver from jdbc.postgresql.org? There have been
a number of changes to server error message handling since 7.4.

-O

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere
" to majordomo@postgresql
.org)

Kris Jurka

2005-07-08, 8:26 pm



On Thu, 7 Jul 2005, Oliver Jowett wrote:

> Joseph Shraibman wrote:
>
>
> Can you try an 8.0-era driver from jdbc.postgresql.org? There have been
> a number of changes to server error message handling since 7.4.
>


Actually this is the same in 7.4 and later versions. The level of detail
put into the exception message is derived from the loglevel URL parameter,
see the toString method.

http://gborg.postgresql.org/project...sage.java?r=1.8

Later driver versions (8.1dev) allow pg specific code to access all of the
fields individually to craft any message they desire.

I personally like the idea of putting more information into the default
error message. How much more do people want?

http://www.postgresql.org/docs/8.0/...ror-fields.html

Kris Jurka

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Dave Cramer

2005-07-10, 7:24 am

Kris,

I think as much as possible makes sense too, this shouldn't be in the
critical path for performance, so why not ?

Dave
On 8-Jul-05, at 8:58 PM, Kris Jurka wrote:


>
>
> On Thu, 7 Jul 2005, Oliver Jowett wrote:
>
>
>
>
> Actually this is the same in 7.4 and later versions. The level of
> detail
> put into the exception message is derived from the loglevel URL
> parameter,
> see the toString method.
>
> http://gborg.postgresql.org/project...php/pgjdbc/org/
> postgresql/util/ServerErrorMessage.java?r=1.8
>
> Later driver versions (8.1dev) allow pg specific code to access all
> of the
> fields individually to craft any message they desire.
>
> I personally like the idea of putting more information into the
> default
> error message. How much more do people want?
>
> http://www.postgresql.org/docs/8.0/...ror-fields.html
>
> Kris Jurka
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster
>
>
>




Dave Cramer
davec@postgresintl.com
www.postgresintl.com
ICQ #14675561
jabber davecramer@jabber.org
ph (519 939 0336 )



---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Oliver Jowett

2005-07-10, 8:23 pm

Kris Jurka wrote:

> I personally like the idea of putting more information into the default
> error message. How much more do people want?


I'd go for severity, message, and detail by default, and "everything" if
you crank up the log level (do we want this to be a separate option to
log level, actually?).

-O

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql
.org so that your
message can get through to the mailing list cleanly

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com