473,326 Members | 2,192 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Is autocommit=true bad?

Greetings,
I've been tasked with maintaining a postgresql-7.3.4 database that has a
J2EE app on the front end.

In the pgsql log I see thousands upon thousands of entries like these:
WARNING: COMMIT: no transaction in progress

Through a little googling, I've determined it means that the folks who
wrote the J2EE app have set autocommit=true. I'm not, by any means, a
java programmer, so I'm not sure if setting autocommit=true serves any
useful purpose, other than not having to add BEGIN and END statements to
your code.

At any rate, are there any negative consequences to setting setting
autocommit=true, such as performance hits (and the obvios filling up
diskspace because of the logging)?

thanks!

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~
Lonni J Friedman ne******@linux-sxs.org
Linux Step-by-step & TyGeMo http://netllama.ipfox.com

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 22 '05 #1
4 1964
Net Llama! wrote:
At any rate, are there any negative consequences to setting setting
autocommit=true, such as performance hits (and the obvios filling up
diskspace because of the logging)?


The greatest negative consequence will be that the code obviously isn't
doing what the programmers think it's doing. The log entry is occuring
because someone is issuing a COMMIT somewhere - obviously expecting that
they're in a transaction at that point.

Check the code, and consider turning autocommit off if it looks like you
need a transaction over more than one statement.
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 22 '05 #2


On Tue, 27 Jan 2004, Net Llama! wrote:
Greetings,
I've been tasked with maintaining a postgresql-7.3.4 database that has a
J2EE app on the front end.

In the pgsql log I see thousands upon thousands of entries like these:
WARNING: COMMIT: no transaction in progress


I believe this is a symptom of an old version of the jdbc driver. Perhaps
upgrading that would make this go away.

Kris Jurka

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 22 '05 #3
On Wed, 28 Jan 2004, Kris Jurka wrote:
On Tue, 27 Jan 2004, Net Llama! wrote:
Greetings,
I've been tasked with maintaining a postgresql-7.3.4 database that has a
J2EE app on the front end.

In the pgsql log I see thousands upon thousands of entries like these:
WARNING: COMMIT: no transaction in progress


I believe this is a symptom of an old version of the jdbc driver. Perhaps
upgrading that would make this go away.


OK thanks. I'm pretty ignorant of jdbc drivers. How could I determine
what version is the most recent, and which version is in use? thanks.

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~
Lonni J Friedman ne******@linux-sxs.org
Linux Step-by-step & TyGeMo http://netllama.ipfox.com

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 22 '05 #4


On Wed, 28 Jan 2004, Net Llama! wrote:
On Wed, 28 Jan 2004, Kris Jurka wrote:
On Tue, 27 Jan 2004, Net Llama! wrote:
Greetings,
I've been tasked with maintaining a postgresql-7.3.4 database that has a
J2EE app on the front end.

In the pgsql log I see thousands upon thousands of entries like these:
WARNING: COMMIT: no transaction in progress


I believe this is a symptom of an old version of the jdbc driver. Perhaps
upgrading that would make this go away.


OK thanks. I'm pretty ignorant of jdbc drivers. How could I determine
what version is the most recent, and which version is in use? thanks.


The most recent version is 7.4.1 and can be downloaded from here:
http://jdbc.postgresql.org/download.html This will work on all older
versions and should be used regardless of your database version. To
determine what version you currently have you can use something like
this...

Connection conn = /* Get connection somehow */
DatabaseMetaData dbmd = conn.getMetaData();
System.out.println(dbmd.getDriverVersion());

Kris Jurka
---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 22 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: grumfish | last post by:
I'm trying to add a row to a MySQL table using insert. Here is the code: connection = MySQLdb.connect(host="localhost", user="root", passwd="pw", db="japanese") cursor = connection.cursor()...
3
by: jason.massey | last post by:
Hi all, I've got a weird problem. I was running Python 2.3 and MySQLdb and had everything running fine. Cutting to the chase: After upgrading to 2.4 (and latest modules) the MySQLdb...
33
by: John Sidney-Woollett | last post by:
With the advent of postgres v8, would it be possible to change the default behaviour of psql from AUTOCOMMIT=ON to AUTOCOMMIT=OFF ? Although this might break backward compatibility, it might be...
1
by: aditya Kulkarni | last post by:
Hi , I have an application that ran on Oracle, and the application, for some reason requires autocommit to be true. Now, when we moved this application to postgres, we moved the blob column to...
13
by: miker2 | last post by:
HI, I'm having trouble writing to a MySql db using python and the MySQLdb module. Here is the code: import MySQLdb base = MySQLdb.connect(host="localhost", user="blah", passwd="blah",...
1
by: spriyasenthil | last post by:
Hi all! Am using two different DB in ORACLE! Letz take it as CONN1 and CONN2 means DATASOURCE: CONN1 USERID : CONN1 PASSWORD : CONN1 same as CONN2 also!.....
11
by: Gert Cuykens | last post by:
import MySQLdb class Db: _db=-1 _cursor=-1 @classmethod def __init__(self,server,user,password,database): self._db=MySQLdb.connect(server , user , password , database)
1
by: vasilip | last post by:
Can anyone help me out with these two issues I seem to be having? using the db2 driver for PHP (db2_xxxxxx) functions 1. If I forget, or for some reason db2_commit/db2_rollback doesn't get...
20
by: dav3 | last post by:
Alright folks I am in need of a lil guidance/assistance here. I have a program which reads in a txt file. This txt file contains lines of the form January 3, 2007, 85.8 Now each line of the txt...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.