Re: odd jdbc driver synchronization issue - Mailing list pgsql-jdbc

From Oliver Jowett
Subject Re: odd jdbc driver synchronization issue
Date
Msg-id 3FF370A8.30807@opencloud.com
Whole thread Raw
In response to Re: odd jdbc driver synchronization issue  ("George Lessmann" <glessmann@hotmail.com>)
Responses Re: odd jdbc driver synchronization issue  ("George Lessmann" <glessmann@hotmail.com>)
List pgsql-jdbc
George Lessmann wrote:

> Dave, all,
>
> Sorry, I thought this was such an obvious thing to do; it would be some
> setting or something I missed (does the jdbc driver have any debug
> options?).

I have multiple connections from a single JVM accessing the same DB
concurrently with no problems; it's likely to be a quirk of the exact
query you run or how you're using the JDBC API.

 > Some of the code is proprietary. Hopefully, this will give
> you an idea of what is happening. Basically, create a number of clients,
> load them with parents, and then run() them. While running, a client
> inserts one parent and a number of children.

Ideally we need a selfcontained, compilable, testcase that demonstrates
the problem. Otherwise it's just guesswork.

Some things you could try to narrow down the problem:

  - Run a couple of instances of your test in separate JVMs, see if you
get any concurrency between them.

  - Get thread dumps from the JVM while your test is running (under
solaris & linux sending SIGQUIT to the JVM does this) and see where your
client threads are blocked.

  - Turn on statement logging (in postgresql.conf) and see exactly when
the queries are being submitted.

  - Run the same queries by hand via psql and see if you get the same
behaviour.

-O


pgsql-jdbc by date:

Previous
From: Barry Lind
Date:
Subject: Re: [HACKERS] PL/Java issues
Next
From: Dave Cramer
Date:
Subject: Re: [HACKERS] PL/Java issues