Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b4KEK-0005BY-9U for pgsql-jdbc@arkaria.postgresql.org; Sun, 22 May 2016 03:39:04 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1b4KEI-0007W1-Ux for pgsql-jdbc@arkaria.postgresql.org; Sun, 22 May 2016 03:39:02 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1b4KDn-0006yn-PN for pgsql-jdbc@postgresql.org; Sun, 22 May 2016 03:38:31 +0000 Received: from mbob.nabble.com ([162.253.133.15]) by magus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b4KDe-00051q-PD for pgsql-jdbc@postgresql.org; Sun, 22 May 2016 03:38:30 +0000 Received: from msam.nabble.com (unknown [162.253.133.85]) by mbob.nabble.com (Postfix) with ESMTP id 9063B28169EC for ; Sat, 21 May 2016 20:21:22 -0700 (PDT) Date: Sat, 21 May 2016 20:38:20 -0700 (MST) From: dmachop To: pgsql-jdbc@postgresql.org Message-ID: <1463888300214-5904483.post@n5.nabble.com> In-Reply-To: References: <1463755344127-5904350.post@n5.nabble.com> Subject: Re: Postgres jdbc bulk insert stuck MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -0.3 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org The table doesn't contain any keys, indices, triggers, etc. This is the first time I create the table. I run a create statement and then run inserts. Vitalii Tymchyshyn-2 wrote > Does it stop on the first batch? No. In fact, 4 batches are processed and gets stuck at 5th batch. Tried with different batch count 256, 1000 (Stuck at after processing 1280, 5000 rows respectively). Vitalii Tymchyshyn-2 wrote > Have you got any triggers on the table? None whatsoever. Just created a table and nothing else. Vitalii Tymchyshyn-2 wrote > Are there any notices sent back to the client? There is a certain > limitation related to client TCP read/write sequencing. I don't receive notifications. Debugged at a point and this is the dump where it seems to be stuck for about an hour or more Thread [BulkDownloader-1] (Suspended) owns: BufferedOutputStream (id=5108) owns: QueryExecutorImpl (id=4483) SocketOutputStream.socketWrite0(FileDescriptor, byte[], int, int) line: not available [native method] [local variables unavailable] SocketOutputStream.socketWrite(byte[], int, int) line: 109 SocketOutputStream.write(byte[], int, int) line: 153 BufferedOutputStream.flushBuffer() line: 82 BufferedOutputStream.write(byte[], int, int) line: 121 BufferedOutputStream(FilterOutputStream).write(byte[]) line: 97 PGStream.Send(byte[]) line: 229 QueryExecutorImpl.sendParse(SimpleQuery, SimpleParameterList, boolean) line: 1327 QueryExecutorImpl.sendOneQuery(SimpleQuery, SimpleParameterList, int, int, int) line: 1629 QueryExecutorImpl.sendQuery(V3Query, V3ParameterList, int, int, int, QueryExecutorImpl$ErrorTrackingResultHandler, BatchResultHandler) line: 1216 QueryExecutorImpl.execute(Query[], ParameterList[], BatchResultHandler, int, int, int) line: 351 PgPreparedStatement(PgStatement).executeBatch() line: 1019 DelegatingPreparedStatement(DelegatingStatement).executeBatch() line: 345 DelegatingPreparedStatement(DelegatingStatement).executeBatch() line: 345 QueryRunner.batch(Connection, boolean, String, Object[][]) line: 152 QueryRunner.batch(Connection, String, Object[][]) line: 92 DBUtil.batch(String, Object[][]) line: 141 DBWriter.merge(SalesforceObject) line: 172 ... -- View this message in context: http://postgresql.nabble.com/Postgres-jdbc-bulk-insert-stuck-tp5904350p5904483.html Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com. -- Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc