X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id D831AD1B35C for ; Tue, 11 May 2004 08:41:08 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 70374-09 for ; Tue, 11 May 2004 08:40:50 -0300 (ADT) Received: from anchor-post-30.mail.demon.net (anchor-post-30.mail.demon.net [194.217.242.88]) by svr1.postgresql.org (Postfix) with ESMTP id 56C31D1B39D for ; Tue, 11 May 2004 08:40:46 -0300 (ADT) Received: from tmsl-adsl.demon.co.uk ([80.177.114.181] helo=bacon.tmsl.demon.co.uk) by anchor-post-30.mail.demon.net with esmtp (Exim 3.35 #1) id 1BNVct-000FDm-0U; Tue, 11 May 2004 12:40:47 +0100 Date: Tue, 11 May 2004 12:40:44 +0100 From: Paul Thomas To: Carlos Barroso Cc: "pgsql-jdbc @ postgresql . org" Subject: Re: Can't insert more than 80 registers!? Message-ID: <20040511124044.C25409@bacon> References: <20040511103520.1ADC6D1B1EE@svr1.postgresql.org> Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=ISO-8859-1 In-Reply-To: <20040511103520.1ADC6D1B1EE@svr1.postgresql.org>; from miguel.barroso@mail.pt on Tue, May 11, 2004 at 11:35:21 +0100 X-Mailer: Balsa 1.2.3 Lines: 42 X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.2 tagged_above=0.0 required=5.0 tests=PLING_QUERY X-Spam-Level: X-Archive-Number: 200405/49 X-Sequence-Number: 10059 On 11/05/2004 11:35 Carlos Barroso wrote: > Here's the testing code: > > Class.forName("org.postgresql.Driver"); > Connection conn = > DriverManager.getConnection("jdbc:postgresql://localhost:6543/dbdev", > "developer", "xpto"); > > Statement st = null; > for(int i = 1; i <= 90; i++) { > st = conn.createStatement(); > st.executeUpdate("INSERT INTO > plano_ensaio(id,ensaio_fk,op_fk,data_hora,estado,user_id,dt_hr) VALUES (" > + i + > ",1,1,'2004-04-04 10:11:11','A','mike','2004-05-05 05:55:55')"); > } > > st.close(); > conn.close(); > > Results: > The code above doesn't give any error. The BIG problem is that it's only > inserting 80 and NOT 90 registers!? > I've tried everything I know and I can't get it working. > I thought it could be because of some WAL configuration, so I increased > the > "wal_buffers" parameter, but got no success. > > Can someone please help me? Don't know what to do. I don't know what the exact problem is but you're got a resource leak. Your st.close() should really be inside your for() loop. -- Paul Thomas +------------------------------+---------------------------------------------+ | Thomas Micro Systems Limited | Software Solutions for Business | | Computer Consultants | http://www.thomas-micro-systems-ltd.co.uk | +------------------------------+---------------------------------------------+