Re: rollback ignored until end of transaction block

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: <oliver(at)opencloud(dot)com>
Cc: <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: rollback ignored until end of transaction block
Date: 2005-11-22 22:37:21
Message-ID: 4383494202000025000008E5@gwmta.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)opencloud(dot)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

Browse pgsql-jdbc by date

  From Date Subject
Next Message Oliver Jowett 2005-11-22 22:44:06 Re: rollback ignored until end of transaction block
Previous Message Kris Jurka 2005-11-22 22:16:16 Re: rollback ignored until end of transaction block