Unix Technical Forum

Tracing commits on the server

This is a discussion on Tracing commits on the server within the pgsql Interfaces jdbc forums, part of the PostgreSQL category; --> I'm trying to debug some database transaction problems, 8.0.3 On the server I've enabled statement logging with the configuration ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Interfaces jdbc

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-15-2008, 11:38 PM
Jeffrey Tenny
 
Posts: n/a
Default Tracing commits on the server

I'm trying to debug some database transaction problems, 8.0.3

On the server I've enabled statement logging with the configuration
parameter:

log_statement = 'all'

Works peachy. But my jdbc transaction commits aren't logged,
and I can't figure out how to see when the server is processing logical
statement commits. (It is definitely not an auto-commit application).

I see one or two commits like this:

LOG: statement: begin; select getdatabaseencoding(); commit
LOG: statement: BEGIN; SELECT usesuper FROM pg_catalog.pg_user WHERE
usename = 'Foo'; COMMIT


I'm not sure where those are coming from, an artifact of some command
line tool or jdbc driver directive.


And I get some of these:

LOG: statement: begin; select getdatabaseencoding(); commit
LOG: statement: BEGIN;SELECT version();
LOG: statement: COMMIT;

I don't think those are comming from my app.

Other than that, I see some of these:

LOG: statement: SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION
LEVEL SERIALIZABLE
LOG: statement: SET SESSION CHARACTERISTICS AS TRANSACTION READ ONLY
LOG: statement: SET SESSION CHARACTERISTICS AS TRANSACTION READ WRITE


Presumably they're being executed at the start of a new transaction, but
there's no sign of any COMMIT statements before them.

What can I do to see where the database is committing the transaction?

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-15-2008, 11:38 PM
Oliver Jowett
 
Posts: n/a
Default Re: Tracing commits on the server

Jeffrey Tenny wrote:
> I'm trying to debug some database transaction problems, 8.0.3
>
> On the server I've enabled statement logging with the configuration
> parameter:
>
> log_statement = 'all'


Try an 8.1 beta -- 8.0 backends don't log the extended query protocol
(which the JDBC driver uses) well at all.

Alternatively, force use of protocol version 2 (pass protocolVersion=2
as a URL parameter), although this also causes other behavioural changes
in the driver.

-O

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:50 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com