Skip site navigation (1) Skip section navigation (2)

Re: [JDBC] number of transactions doubling

From: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
To: "Jim C(dot) Nasby" <jim(at)nasby(dot)net>
Cc: Sriram Dandapani <sdandapani(at)counterpane(dot)com>, pgsql-jdbc(at)postgresql(dot)org, pgsql-admin(at)postgresql(dot)org
Subject: Re: [JDBC] number of transactions doubling
Date: 2006-09-29 08:56:15
Message-ID: 451CDFAF.5050804@enterprisedb.com (view raw or flat)
Thread:
Lists: pgsql-adminpgsql-jdbc
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


In response to

Responses

pgsql-admin by date

Next:From: Matthew T. O'ConnorDate: 2006-09-29 13:31:48
Subject: Re: autovacuum ignore tables
Previous:From: Sriram DandapaniDate: 2006-09-29 06:40:35
Subject: Re: autovacuum ignore tables

pgsql-jdbc by date

Next:From: Simon RiggsDate: 2006-09-29 11:24:24
Subject: Re: Optimizations in the latest driver
Previous:From: Jim C. NasbyDate: 2006-09-29 00:47:36
Subject: Re: number of transactions doubling

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group