Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id A9FEC63270B for ; Thu, 5 Nov 2009 07:49:26 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 96006-05 for ; Thu, 5 Nov 2009 11:49:09 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.postnewspapers.com.au (202-89-185-120.static.dsl.amnet.net.au [202.89.185.120]) by mail.postgresql.org (Postfix) with ESMTP id 6A3646326D1 for ; Thu, 5 Nov 2009 07:49:15 -0400 (AST) Received: from localhost (access [127.0.0.1]) by mail.postnewspapers.com.au (Postfix) with ESMTP id 3620B1E0444; Thu, 5 Nov 2009 19:49:11 +0800 (WST) X-Virus-Scanned: Debian amavisd-new at postnewspapers.com.au Received: from mail.postnewspapers.com.au ([127.0.0.1]) by localhost (access.postnewspapers.com.au [127.0.0.1]) (amavisd-new, port 10024) with LMTP id EX2CygRrIDqm; Thu, 5 Nov 2009 19:49:08 +0800 (WST) Received: from [10.1.1.5] (124-169-36-119.dyn.iinet.net.au [124.169.36.119]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "Craig Ringer", Issuer "POST Certificate Authority" (verified OK)) by mail.postnewspapers.com.au (Postfix) with ESMTPSA id 3AE9A1E0443; Thu, 5 Nov 2009 19:49:08 +0800 (WST) Message-ID: <4AF2BBB3.5030300@postnewspapers.com.au> Date: Thu, 05 Nov 2009 19:49:07 +0800 From: Craig Ringer User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: Eduardo Morras CC: pgsql-performance Subject: Re: Followup: vacuum'ing toast References: <4AF229F5.201@2ndquadrant.com> <4AF24006.1010509@postnewspapers.com.au> <20091105090655.8EA085580B0@s21sec.com> In-Reply-To: <20091105090655.8EA085580B0@s21sec.com> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.395 tagged_above=-10 required=5 tests=AWL=0.204, BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 200911/64 X-Sequence-Number: 36232 Eduardo Morras wrote: >> 3) Autocommit being disabled. At least when using Hibernate via JPA, >> that'll cause a major mess and would easily explain the issues you're >> seeing. Hibernate manages transactions explicitly when required, and >> expects autocommit to be off. > > Excuse me but i don't understand this point. You say that the problem happens if Autocommit is disabled but that hibernates expects that Autocommit is disabled for a correct work. What's better then? Autocommit off for Hibernate or Autocommit On for the original poster problem. Can you explain it more? Argh! I'm really sorry. I meant that Hibernate expects autocommit to be _enabled_. However, when I want back to the documentation to double-check my understanding: http://docs.jboss.org/hibernate/core/3.3/reference/en/html/session-configuration.html it reads: "hibernate.connection.autocommit: Enables autocommit for JDBC pooled connections (it is not recommended). e.g. true | false" ... so now I'm confused too. I *know* I had issues initially when I disabled autocommit explicitly (particularly with explicit transaction management), and that everything works well in my app with autocommit off via the hibernate.connection.autocommit param, but that appears to conflict with the documentation. Maybe it's different when hibernate is used via the JPA APIs as I'm using it? Thanks for checking that. I guess now I'm confused too, but that's better than "knowing" something wrong. -- Craig Ringer