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

Re: Implicit autocommit?

From: Eric Faulhaber <ecf(at)goldencode(dot)com>
To: Oliver Jowett <oliver(at)opencloud(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Implicit autocommit?
Date: 2007-07-15 17:34:30
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-jdbc
Oliver Jowett wrote:
> Eric Faulhaber wrote:
>> I debugged into the driver and found it was issuing a "BEGIN" to the 
>> backend just before each statement.  Why would it do this with 
>> autocommit disabled?
> autocommit on = implicit transaction wrapping each individual 
> statement. In the postgres world, this means "don't use BEGIN/COMMIT 
> at all".
> autocommit off = explicit transaction demarcation, the first statement 
> executed starts a new transaction that lasts until rollback()/commit() 
> are called. In the postgres world, this means "use 
> BEGIN/ROLLBACK/COMMIT to demarcate the transaction". So the driver 
> issues a BEGIN to start a new transaction as necessary.
> -O
Unless I misunderstand your answer, this suggests that vacuum cannot be 
run via JDBC, since it cannot be run within a transaction block.  It is 
my understanding that autovacuum skips temp tables:

This is consistent with my experience.  So, how can I vacuum a 
long-lived temp table created with a JDBC connection?

Eric Faulhaber

In response to


pgsql-jdbc by date

Next:From: Jan de VisserDate: 2007-07-15 20:14:35
Subject: Re: Implicit autocommit?
Previous:From: Kris JurkaDate: 2007-07-15 15:42:33
Subject: Re: incomplete batch-updates

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