From: Heikki Linnakangas <heikki@enterprisedb.com>
To: Jim C. Nasby <jim@nasby.net>
Cc: Sriram Dandapani <sdandapani@counterpane.com>
Cc: pgsql-jdbc@postgresql.org
Cc: pgsql-admin@postgresql.org
Subject: Re: [JDBC] number of transactions doubling
Date: Fri, 29 Sep 2006 09:56:15 +0100
Message-ID: <451CDFAF.5050804@enterprisedb.com> (raw)
In-Reply-To: <20060929004736.GM34238@nasby.net>
References: <6992E470F12A444BB787B5C937B9D4DF060E5AD6@ca-mail1.cis.local>
<20060929004736.GM34238@nasby.net>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: heikki@enterprisedb.com, jim@nasby.net, sdandapani@counterpane.com, pgsql-jdbc@postgresql.org
Subject: Re: [JDBC] number of transactions doubling
In-Reply-To: <451CDFAF.5050804@enterprisedb.com>
References: <6992E470F12A444BB787B5C937B9D4DF060E5AD6@ca-mail1.cis.local> <20060929004736.GM34238@nasby.net> <451CDFAF.5050804@enterprisedb.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox