Home > Archive > PostgreSQL Discussion > April 2005 > lots of puzzling log messages









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author lots of puzzling log messages
Dennis Sacks

2005-04-19, 8:23 pm

I am Seeing twelve of these messages every five to ten seconds in the
Postgresql serverlog when my java application is running:


2005-04-19 16:43:03 LOG: 00000: duration: 0.246 ms
LOCATION: exec_simple_query, postgres.c:960
2005-04-19 16:43:03 LOG: 00000: statement: rollback; begin;
LOCATION: pg_parse_query, postgres.c:464


postgresql.conf has:

log_connections = true
log_duration = true
log_statement = true
log_timestamp = true

Running postgres 7.4.2.

The Java application uses postgresql-7.4.1.jar. It is a custom developed
application.

I am wondering what these log messages mean. Any ideas?

Dennis

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Michael Fuhr

2005-04-20, 11:23 am

On Tue, Apr 19, 2005 at 05:39:42PM -0700, Dennis Sacks wrote:
>
> I am Seeing twelve of these messages every five to ten seconds in the
> Postgresql serverlog when my java application is running:
>
> 2005-04-19 16:43:03 LOG: 00000: duration: 0.246 ms
> LOCATION: exec_simple_query, postgres.c:960
> 2005-04-19 16:43:03 LOG: 00000: statement: rollback; begin;
> LOCATION: pg_parse_query, postgres.c:464


Looks like the application is aborting its transaction (rollback)
and starting a new one (begin). If you're not doing this explicitly
then the API is probably doing it under the hood. If you're logging
queries then you should be able to figure out where this is happening
in the application.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql
.org so that your
message can get through to the mailing list cleanly

Tom Lane

2005-04-20, 11:23 am

Michael Fuhr <mike@fuhr.org> writes:
> On Tue, Apr 19, 2005 at 05:39:42PM -0700, Dennis Sacks wrote:
[color=darkred]
> Looks like the application is aborting its transaction (rollback)
> and starting a new one (begin). If you're not doing this explicitly
> then the API is probably doing it under the hood.


I think older versions of the JDBC driver will do that behind your back
.... try the latest driver, and if you still see it then inquire on
pgsql-jdbc.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Kris Jurka

2005-04-21, 8:24 pm



On Wed, 20 Apr 2005, Tom Lane wrote:

>
> I think older versions of the JDBC driver will do that behind your back
> ... try the latest driver, and if you still see it then inquire on
> pgsql-jdbc.


The latest driver will do that as well, but in two statements now that
transaction end doesn't automatically start a new one immediately. The
difference is that the server doesn't log it for the 8.0 driver because
it prepares the begin/commit/rollback statements just once and executes
them from then on.

Kris Jurka

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Tom Lane

2005-04-23, 8:23 pm

Kris Jurka <books@ejurka.com> writes:
> The latest driver will do that as well, but in two statements now that
> transaction end doesn't automatically start a new one immediately. The
> difference is that the server doesn't log it for the 8.0 driver because
> it prepares the begin/commit/rollback statements just once and executes
> them from then on.


Hmm. ISTM the value of preparing a utility statement like begin/commit/
rollback would be minuscule at best. Is there a reason for not just
issuing those as plain queries?

regards, tom lane

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

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com