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

Re: When running with autocommit false only the first BEGIN

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Barry Lind <blind(at)xythos(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: When running with autocommit false only the first BEGIN
Date: 2004-11-23 10:21:32
Message-ID: 41A30F2C.40801@opencloud.com (view raw or flat)
Thread:
Lists: pgsql-jdbc
Barry Lind wrote:
> While debugging my other server problem, I noticed that that only the
> first BEGIN and COMMIT are logged on the server with sql statement
> logging enabled.  It seems that the subsequent transaction control
> statements are being executed correctly, it is just that they are not
> being logged by the server.  Is this to be expected?  If so, it makes
> debugging a bit difficult as you can't see what commits are really being
> executed when you have sql statement logging enabled.

Yeah, it's a limitation of statement logging. Statements are logged only 
on Parse, not on Bind/Execute. The driver reuses the internal 
BEGIN/COMMIT statements, so only one Parse is done for each. You will 
see the same thing for user queries if they end up using server-side 
prepare.

There should be some past discussion about this in the -hackers archives.

-O

In response to

Responses

pgsql-jdbc by date

Next:From: Oliver JowettDate: 2004-11-23 10:40:48
Subject: Re: Can't throw the dreaded 'idle in transaction' - need help!
Previous:From: Barry LindDate: 2004-11-23 06:12:32
Subject: When running with autocommit false only the first BEGIN and COMMIT are logged on server

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