Re: rollback ignored until end of transaction block - Mailing list pgsql-jdbc

From Kevin Grittner
Subject Re: rollback ignored until end of transaction block
Date
Msg-id 4383494202000025000008E5@gwmta.wicourts.gov
Whole thread Raw
In response to rollback ignored until end of transaction block  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
List pgsql-jdbc
The driver is the download of this file:

postgresql-8.1-404.jdbc3.jar

(We didn't do our own build on this.)

The logging from our app isn't giving anything beyond this exception
and stack trace.  We're running hundreds of thousands of transactions
per day in, with a pattern of:

(1)  Try a number of separate insert/update/delete operations in a
single database transaction.  Deletes and updates are done through
updateable result sets.  Inserts are done through prepared statements.

(2)  If an exception is thrown, cancel the statement, close the result
set (if open), close the statement, and retry in "cautious mode".  While
in cautious mode, updates of nonexistant rows become inserts, inserts
of duplicate rows become updates, oversized strings are truncated,
etc., and a commit is done of each insert/update/delete.

During a window of time I'm looking at, we processed about 50,000
of the high level transactions in about 90 minutes.  We had three of
these rollback problems.  Nothing showed in the postmaster log at the
time of these exceptions.

If I were to run with loglevel=2 with this load for an hour or two, how
big do you think the log file would get?

-Kevin


>>> Oliver Jowett <oliver@opencloud.com>  >>>
Kevin Grittner wrote:
> Is there any context where this would make sense?:
>
> org.postgresql.util.PSQLException: ERROR: current transaction is
> aborted, commands ignored until end of transaction block
>     at
>
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1512)
>     at
>
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1297)
>     at
>
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:188)
>     at
>
org.postgresql.jdbc2.AbstractJdbc2Connection.executeTransactionCommand(AbstractJdbc2Connection.java:617)
>     at
>
org.postgresql.jdbc2.AbstractJdbc2Connection.rollback(AbstractJdbc2Connection.java:654)

Huh, that *is* weird. rollback() should do nothing but execute ROLLBACK,

which shouldn't trigger that error.. How did you get it into that state?

Can you run with loglevel=2 and see what the trace says? What driver
version?

-O


pgsql-jdbc by date:

Previous
From: Kris Jurka
Date:
Subject: Re: rollback ignored until end of transaction block
Next
From: Oliver Jowett
Date:
Subject: Re: rollback ignored until end of transaction block