Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id F1381633652 for ; Thu, 5 Nov 2009 08:09:26 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 34121-10 for ; Thu, 5 Nov 2009 12:09:18 +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 EC22E6331C2 for ; Thu, 5 Nov 2009 08:09:18 -0400 (AST) Received: from localhost (access [127.0.0.1]) by mail.postnewspapers.com.au (Postfix) with ESMTP id 7E7231E0445; Thu, 5 Nov 2009 20:09:13 +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 PjqqWyqzx2YB; Thu, 5 Nov 2009 20:09:11 +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 87CDB1E0444; Thu, 5 Nov 2009 20:09:11 +0800 (WST) Message-ID: <4AF2C066.7070201@postnewspapers.com.au> Date: Thu, 05 Nov 2009 20:09:10 +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> <4AF2BBB3.5030300@postnewspapers.com.au> In-Reply-To: <4AF2BBB3.5030300@postnewspapers.com.au> 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.599 tagged_above=-10 required=5 tests=BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 200911/65 X-Sequence-Number: 36233 Craig Ringer wrote: > 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_. Some searching suggests that, indeed, the issue is that when using Hibernate via JPA (Hibernate EntityManager) autocommit needs to be left enabled. For some reason there doesn't seem to be any explicit reference to autocommit in the Hibernate EntityManager docs or the EJB3 spec. I can't find anything but (numerous) forum posts and the like on this, so don't take it as definitive. -- Craig Ringer