pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Tracing commits on the server
2+ messages / 2 participants
[nested] [flat]

* Tracing commits on the server
@ 2005-09-24 19:46 Jeffrey Tenny <jeffrey.tenny@comcast.net>
  2005-09-24 21:33 ` Re: Tracing commits on the server Oliver Jowett <oliver@opencloud.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Jeffrey Tenny @ 2005-09-24 19:46 UTC (permalink / raw)
  To: pgsql-jdbc

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?



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Tracing commits on the server
  2005-09-24 19:46 Tracing commits on the server Jeffrey Tenny <jeffrey.tenny@comcast.net>
@ 2005-09-24 21:33 ` Oliver Jowett <oliver@opencloud.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Oliver Jowett @ 2005-09-24 21:33 UTC (permalink / raw)
  To: Jeffrey Tenny <jeffrey.tenny@comcast.net>; +Cc: pgsql-jdbc

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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2005-09-24 21:33 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-09-24 19:46 Tracing commits on the server Jeffrey Tenny <jeffrey.tenny@comcast.net>
2005-09-24 21:33 ` Oliver Jowett <oliver@opencloud.com>

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