Message-ID: From: "davecramer (@davecramer)" To: "pgjdbc/pgjdbc" Date: Fri, 16 Sep 2016 11:56:44 +0000 Subject: Re: [pgjdbc/pgjdbc] issue #194: PgJDBC can experience client/server deadlocks during batch execution In-Reply-To: References: List-Id: X-GitHub-Author-Login: davecramer X-GitHub-Comment-Id: 247582716 X-GitHub-Comment-Type: issue_comment X-GitHub-Issue: 194 X-GitHub-Repo: pgjdbc/pgjdbc X-GitHub-Type: comment X-GitHub-Url: https://github.com/pgjdbc/pgjdbc/issues/194#issuecomment-247582716 Content-Type: text/plain; charset=utf-8 Thx for the report. I would suggest upgrading as rewriteInsert in 1209 makes batch inserts much faster Dave Cramer On 16 September 2016 at 04:51, Nicolas Barbier notifications@github.com wrote: > Just FYI: > > We had this problem with Maven artifact org.postgresql:postgresql:9.4.1208.jre6. > The stacktrace on the client is: > > "SqlExecutor-remote" daemon prio=6 tid=0x000000000cbaf000 nid=0x11dc runnable [0x0000000013d0e000] java.lang.Thread.State: RUNNABLE > at java.net.SocketOutputStream.socketWrite0(Native Method) > at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:113) > at java.net.SocketOutputStream.write(SocketOutputStream.java:159) > at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82) > at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140) > - locked <0x00000000b861f3b8> (a java.io.BufferedOutputStream) > at org.postgresql.core.PGStream.flush(PGStream.java:525) > at org.postgresql.core.v3.QueryExecutorImpl.sendSync(QueryExecutorImpl.java:1255) > at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:199) > - locked <0x00000000b861f580> (a org.postgresql.core.v3.QueryExecutorImpl) > at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:424) > at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:161) > at org.postgresql.jdbc.PgPreparedStatement.execute(PgPreparedStatement.java:155) > > The server just shows in pg_stat_activity that it is executing some SQL > statement that is part of the batch, with waiting == false. We had it once > that that statement was even supposed to return zero rows (because the > corresponding table was empty). > > We only seem to have the problem when the client runs on the same host as > the server (connection using TCP from some IP address to the same IP > address, not necessarily 127.0.0.1). > > We only ever had this at our clients that use Windows (but it might also > occur on other operating systems). > > We are trying to find a way to tweak the settings so as to avoid this > problem. > > — > You are receiving this because you are subscribed to this thread. > Reply to this email directly, view it on GitHub > https://github.com/pgjdbc/pgjdbc/issues/194#issuecomment-247561787, or mute > the thread > https://github.com/notifications/unsubscribe-auth/AAYz9p3-MI4_g0sr2ghxdG8MKIZJUWPYks5qqmargaJpZM4Cp_Iz > .