pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Radosław Smogura <mail@smogura.eu>
To: pgsql-jdbc@postgresql.org
Subject: Re: Unable to commit: transaction marked for rollback
Date: Sat, 3 Jul 2010 10:36:46 +0200
Message-ID: <201007031036.46492.mail@smogura.eu> (raw)
In-Reply-To: <4C2CBD620200002500032F49@gw.wicourts.gov>
References: <20100701181528.GA97516@mr-paradox.net>
	<4C2CFDE1.1020308@mr-paradox.net>
	<4C2CBD620200002500032F49@gw.wicourts.gov>

Hi,

It can be caused by other reasones then SQL error. You wrote that error occurs 
after 5 hours, if you processing such long time in one transaction, then 
server can mark transcation for rollback automaticlly (it can "think", 
deadlock occured, too slow, infinite loop, etc...). You need to check Geronimo, 
setting about transactions timeouts.

I've looked at error from your example, because I didn't belived such 
behavior. Unfortunatly it's true. Postgresql disallow to execute next 
statement if error occured - this is realy bad approach, because error can be 
from dupliacte keys etc. :(

Regards,
Radek

Dnia czwartek 01 lipiec 2010 o 23:08:02 Kevin Grittner napisał(a):
> David Kerr <dmk@mr-paradox.net> wrote:
> >> Have you checked the PostgreSQL log file for clues?  If you're
> >> not seeing what you need, you could tweak the logging to show
> >> more.
> > 
> > We're trying that, it's (of course) intermittent and happens after
> > like 5 hours. so huge logfiles, etc as usual. With
> > log_statements=none turned on PG logs database errors. so it seems
> > like whatever's happening isn't being considered an "error". more
> > of a natural database transaction (like a lock) or something. does
> > that sound about right?
> 
> Hmmm....  I was just guessing at the cause.  With default logging,
> if I do this:
> 
> test=# begin;
> BEGIN
> test=# select foo;
> ERROR:  column "foo" does not exist
> LINE 1: select foo;
>                ^
> test=# select 'foo';
> ERROR:  current transaction is aborted, commands ignored until end
> of transaction block
> test=# commit;
> ROLLBACK
> 
> I see this in the log:
> 
> ERROR:  column "foo" does not exist at character 8
> STATEMENT:  select foo;
> ERROR:  current transaction is aborted, commands ignored until end
> of transaction block
> STATEMENT:  select 'foo';
> 
> If you aren't seeing something like that, I'm probably off-base in
> my guess at the cause.  Nothing else leaps to mind, unfortunately.
> 
> :-(
> 
> -Kevin



view thread (13+ messages)  latest in thread

Message-ID: <201007031036.46492.mail@smogura.eu>
Permalink:  ../201007031036.46492.mail@smogura.eu/
Also on:    postgresql.org/message-id/201007031036.46492.mail@smogura.eu

 · 

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: mail@smogura.eu
  Subject: Re: Unable to commit: transaction marked for rollback
  In-Reply-To: <201007031036.46492.mail@smogura.eu>
  References: <20100701181528.GA97516@mr-paradox.net> <4C2CFDE1.1020308@mr-paradox.net> <4C2CBD620200002500032F49@gw.wicourts.gov> <201007031036.46492.mail@smogura.eu>

* 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