Re: Autocommit - Mailing list pgsql-performance

From Michael Fuhr
Subject Re: Autocommit
Date
Msg-id 20050214084703.GA4038@winnie.fuhr.org
Whole thread Raw
In response to Autocommit  (Hasnul Fadhly bin Hasan <hasnulfadhly.h@mimos.my>)
Responses Re: Autocommit
List pgsql-performance
On Mon, Feb 14, 2005 at 04:01:20PM +0800, Hasnul Fadhly bin Hasan wrote:
>
> I am just wondering, by default, autocommit is enabled for every client
> connection.  The documentations states that we have to use BEGIN
> and  END or COMMIT so to increase performance by not using autocommit.
> My question is, when we use the BEGIN and END statements, is autocommit
> unset/disabled automatically or we have to disable/unset it manually?

What version of PostgreSQL is your server running and what client
software are you using?  PostgreSQL 7.3 had a server-side autocommit
setting, but it caused problems with some clients so 7.4 got rid
of it and left autocommit up to the client.  How to enable or disable
client-side autocommit depends on the client software, but if you're
able to execute a BEGIN (or START TRANSACTION) statement then you
should be inside a transaction until you execute COMMIT (or END)
or ROLLBACK.  That is, unless your client intercepts these statements
and does whatever it wants....

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

pgsql-performance by date:

Previous
From: Hasnul Fadhly bin Hasan
Date:
Subject: Autocommit
Next
From: Hasnul Fadhly bin Hasan
Date:
Subject: Re: Autocommit