pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jeffrey Tenny <jeffrey.tenny@comcast.net>
To: pgsql-jdbc@postgresql.org
Subject: Tracing commits on the server
Date: Sat, 24 Sep 2005 15:46:31 -0400
Message-ID: <4335AD17.9020608@comcast.net> (raw)

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?



view thread (2+ messages)  latest in thread

Message-ID: <4335AD17.9020608@comcast.net>
Permalink:  ../4335AD17.9020608@comcast.net/
Also on:    postgresql.org/message-id/4335AD17.9020608@comcast.net

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: jeffrey.tenny@comcast.net
  Subject: Re: Tracing commits on the server
  In-Reply-To: <4335AD17.9020608@comcast.net>
  References: <4335AD17.9020608@comcast.net>

* 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