From: Michael Fuhr <mike@fuhr.org>
To: Hasnul Fadhly bin Hasan <hasnulfadhly.h@mimos.my>
Cc: pgsql-performance@postgresql.org
Subject: Re: Autocommit
Date: Mon, 14 Feb 2005 01:47:03 -0700
Message-ID: <20050214084703.GA4038@winnie.fuhr.org> (raw)
In-Reply-To: <42105AD0.2010803@mimos.my>
References: <42105AD0.2010803@mimos.my>
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/
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 using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: mike@fuhr.org, hasnulfadhly.h@mimos.my
Subject: Re: Autocommit
In-Reply-To: <20050214084703.GA4038@winnie.fuhr.org>
* 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