473,805 Members | 2,007 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Commit Transaction Command

The debug logs seem a little confusing. On sending a query something like
this will show up:

DEBUG: StartTransactio nCommand
LOG: query: select * from blah;
DEBUG: ProcessQuery
DEBUG: CommitTransacti onCommand

This is with auto commit off. My first reaction on seeing this was the auto
commit setting must not work. Then I noticed that most things, even "begin"
and "commit" commands entered via the query interface in psql were wrapped
with the same "DEBUG" output. And finally I did some testing and found that
transactions did in fact work correctly.

I am hoping that someone can enlighten me as to what this DEBUG output
actually indicates.

Running version 7.3.5.

Thanks,

Jim Wilson
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddres sHere" to ma*******@postg resql.org)

Nov 23 '05 #1
2 1905

If you don't explicitly BEGIN, the interface (psql) will wrap every of
your commands in a transaction.

On Fri, 6 Aug 2004 01:44:05 -0000, Jim Wilson <ji**@kelcomain e.com> wrote:
The debug logs seem a little confusing. On sending a query something
like
this will show up:

DEBUG: StartTransactio nCommand
LOG: query: select * from blah;
DEBUG: ProcessQuery
DEBUG: CommitTransacti onCommand

This is with auto commit off. My first reaction on seeing this was the
auto
commit setting must not work. Then I noticed that most things, even
"begin"
and "commit" commands entered via the query interface in psql were
wrapped
with the same "DEBUG" output. And finally I did some testing and found
that
transactions did in fact work correctly.

I am hoping that someone can enlighten me as to what this DEBUG output
actually indicates.

Running version 7.3.5.

Thanks,

Jim Wilson
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddres sHere" to ma*******@postg resql.org)


---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postg resql.org

Nov 23 '05 #2
On Fri, Aug 06, 2004 at 01:44:05AM -0000, Jim Wilson wrote:
The debug logs seem a little confusing. On sending a query something like
this will show up:

DEBUG: StartTransactio nCommand
LOG: query: select * from blah;
DEBUG: ProcessQuery
DEBUG: CommitTransacti onCommand


The CommitTransacti onCommand function actually means "stop processing
the command we just received". If said command was a COMMIT or
ROLLBACK, then it will also commit the transaction (resp. abort it). If
it wasn't, then the transaction will be kept open. So you have nothing
to worry about, short of a loglevel set up a little too high ;-)

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Coge la flor que hoy nace alegre, ufana. ¿Quién sabe si nacera otra mañana?"
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

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

Nov 23 '05 #3

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

Similar topics

3
11628
by: DP | last post by:
Is there any command exists as "commit transaction" ? begin transaction < DML1 stmts > begin transaction < DML2 stmts > rollback transaction commit transaction which set of DML will be commites to the database or none ?
11
12723
by: Markus Breuer | last post by:
I have a question about oracle commit and transactions. Following scenario: Process A performs a single sql-INSERT into a table and commits the transaction. Then he informs process B (ipc) to read the new date. So process B starts "select ..." but does not get the previously inserted row. The timespan between commit and select is very short. (NOTE: two different sessions are used) Questions: 1.) Does commit when returning from call...
8
11753
by: Martin Staael | last post by:
When doing a UPDATE on a very large table it can take quite a long time due to the commit/rollback option. Is there any way on the client side to disable the commit/rollback option so that UPDATE will make any changes without requiring a commit - and hopefully be much faster? I'm aware of the 'db2 -c' option Best regards, Martin
3
8729
by: Mark | last post by:
If a java applicaiton using the type 4 driver calls a DB2 stored procedure, does the stored procedure need to do its own commit when updates are completed? If the stored procedure does a commit or rollback, does that affect the UOW for any SQL that was directly issued by the java program before calling the stored procedure?
1
10388
by: Jason Huang | last post by:
Hi, I am just wondering how do we test the transaction's Commit and Rollback? How do we simulate a situation to let the transaction fail then Rollback? Thanks for help. Jason
7
8778
by: fyi85 | last post by:
I have 8.1.5 on Windows 2003, when I do from CLP with auto commit off: db2 update table set column=something and then db2 terminate and then db2 connect to db db2 select updated column from table the update is committed anyways, whereas the docs state that the update is supposed to be rolled back (auto commit is off) Does this indicate a bug or a mistake in the docs?
3
3766
by: Ralf Assmann | last post by:
Hi there, we have the following problem using a DB2 version 7 on z/OS, referring also <a href="http://groups.google.de/group/comp.databases.ibm-db2/browse_thread/thread/2555018c0d364314/ea946c98e25ce4b7?lnk=gst&q=assmann&rnum=2#ea946c98e25ce4b7">this thread</a>: Using a java program with a connection to a DB2 using a type 2-driver, we insert many datasets into the database in one transaction. The type 2-driver connects to the database...
1
1502
by: Scott Cupstid | last post by:
We are working on a VB.NET application using SQLClient command objects to post data to the underlying SQL Server 2000 database. The application is deployed in a multi-user environment with no more than 10 user accessing the database at any given time. The host server is supporting approximately 4 other active databases. In general, there are approximately 60 active connections on the server. The incident we are trying to resolve has...
5
3494
by: Roger | last post by:
backup log testdb with truncate_only DBCC SHRINKFILE (testdb_log, 100) WITH NO_INFOMSGS backup database testdb to disk = '\\DC01\Backups\DB01\testdb.bak' with init and does the shrinkfile command reduce the size of the ldf ?
0
9716
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9596
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10604
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10361
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9179
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7644
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6874
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5676
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4316
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.