Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id B294F9FB1FB; Fri, 29 Sep 2006 05:56:18 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 83365-04; Fri, 29 Sep 2006 08:56:14 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- X-Greylist: from auto-whitelisted by SQLgrey- Received: from webmail.enterprisedb.com (edb04.managed.contegix.com [63.246.7.176]) by postgresql.org (Postfix) with ESMTP id 2C7519FB1D6; Fri, 29 Sep 2006 05:56:13 -0300 (ADT) Received: from [192.168.0.20] (unknown [62.232.55.86]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by webmail.enterprisedb.com (Postfix) with ESMTP id B0F41A24A83; Fri, 29 Sep 2006 03:56:09 -0500 (CDT) Message-ID: <451CDFAF.5050804@enterprisedb.com> Date: Fri, 29 Sep 2006 09:56:15 +0100 From: Heikki Linnakangas User-Agent: Thunderbird 1.5.0.5 (X11/20060812) MIME-Version: 1.0 To: "Jim C. Nasby" CC: Sriram Dandapani , pgsql-jdbc@postgresql.org, pgsql-admin@postgresql.org Subject: Re: [JDBC] number of transactions doubling References: <6992E470F12A444BB787B5C937B9D4DF060E5AD6@ca-mail1.cis.local> <20060929004736.GM34238@nasby.net> In-Reply-To: <20060929004736.GM34238@nasby.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.135 tagged_above=0 required=5 tests=FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200609/361 X-Sequence-Number: 23275 Jim C. Nasby wrote: > On Thu, Sep 28, 2006 at 02:51:24PM -0700, Sriram Dandapani wrote: > >> The target table has triggers that route data to appropriate tables. The >> tables to which data is routed has check constraints that do further >> inserts. (All of this happens in 1 jdbc transaction) >> > > Actually, no matter what JDBC is doing, all of that will happen within a > single transaction on the database (unless you're using something like > dblink from within the triggers). So even if you were issuing insert > statements with autocommit on, you'd see at most one transaction per > insert. > The triggers might use subtransactions. You get implicit subtransactions if have an EXCEPTION clause in a plpgsql function. I'm not sure if there's other things that do that as well. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com