Received: from localhost (unknown [200.46.204.184]) by developer.postgresql.org (Postfix) with ESMTP id 37ABC2E003A for ; Mon, 12 May 2008 19:28:03 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 03429-04 for ; Mon, 12 May 2008 19:27:50 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.28]) by developer.postgresql.org (Postfix) with ESMTP id 87DEC2E0031 for ; Mon, 12 May 2008 19:27:56 -0300 (ADT) Received: by yw-out-2324.google.com with SMTP id 3so1489503ywj.73 for ; Mon, 12 May 2008 15:27:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=NQC7+XpeMAd0hfTyuaSt3IvfqQAgJ30bn2MTqYBUJa8=; b=vH/KIFc10w9vbuUCaOeWdZpEynd7WzXXqIK+7NwFHkxSfsFk59NlCJwtYH9d+uUkX2y57D/owkK+tAdJrYfm1E88zPz+2O+EDZkcDFpBjQlfAMhDg4y7XE+7NqtCRX5zWTvmlRumfaIk7QvyJz0YzJiuwOpKZ8wMlZFB4o05S/A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=VcTkdjtpV8s1fa2Dz0668Jo763ovfzrn1bJGFhBtQUI7IFRJcgTF3V9buLfZiiep7o6mFcy5CoPLjuepsoUGRG6GefsFus1G3b1Fadh2MLtkdSZV2MlBRFYyE3Bpj9dVCITR8+y1QEIJ1+X3Si3CE2CnSHLJ9u/eDErxMeYx8KQ= Received: by 10.150.84.41 with SMTP id h41mr8855346ybb.221.1210631275213; Mon, 12 May 2008 15:27:55 -0700 (PDT) Received: by 10.150.229.19 with HTTP; Mon, 12 May 2008 15:27:55 -0700 (PDT) Message-ID: Date: Tue, 13 May 2008 17:57:55 +1930 From: "Neil Peter Braggio" To: pgsql-performance@postgresql.org Subject: Re: Partitioning: INSERT 0 0 but want INSERT 0 1 In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.448 tagged_above=0 required=5 tests=AWL=-0.205, INVALID_DATE_TZ_ABSURD=0.243, SUBJECT_FUZZY_TION=0.41 X-Spam-Level: X-Archive-Number: 200805/147 X-Sequence-Number: 30115 I have the same problem in PG 8.2 To resolve this issue I had to create a new table with the same structure than the partitioned table with a trigger for insert and update. All the operations the application have to do are directed to this new table. When a new record is inserted in the new table the trigger insert a new record with the same values into the partitioned table and then delete all records from this new table. In updates operations the trigger redirect the operation to the partitioned table too. With this _not elegant_ solution our Java application is able to do its job. If you find a better solution please let me know. ---- Neil Peter Braggio pbraggio@gmail.com On Tue, May 13, 2008 at 11:48 AM, Nikolas Everett wrote: > I figure this subject belongs on the performance mailing list because it is > about partitioning, which is a performance issue. > > I'm working on partitioning some of the tables used by an application that > uses OpenJPA. It turns out that OpenJPA is sensitive to the numbers > returned when you do an insert. So I put together a test and attached it. > My postgres version is 8.3.1 compiled from source. > > My problem is that this: > test=> INSERT INTO ttt (a, b) VALUES ('5-5-08', 'test11212'); > INSERT 0 0 > Time: 21.646 ms > needs to show: > INSERT 0 1 > > or OpenJPA will not accept it. The insert works, but OpenJPA does not > believe it and aborts the current transaction. > > Is it possible to have partitioning and have insert show the right number of > rows inserted? > > Thanks, > > --Nik > > > -- > Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-performance > >