Re: Don't understand transaction error

From: Scott Marlowe <smarlowe(at)g2switchworks(dot)com>
To: jonathan(at)innovativesource(dot)net
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Don't understand transaction error
Date: 2005-09-01 15:51:55
Message-ID: 1125589915.28179.161.camel@state.g2switchworks.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 2005-09-01 at 10:36, Jonathan Villa wrote:
> I'm getting the following error when attempting to use my application:
>
> ERROR: current transaction is aborted, commands ignored until end of
> transaction block
>
> I have no clue... the only idea I have is to somehow release any
> transaction locks, but I don't how to list, or even if possible, to list
> current locks. If there is a way to do this, perhaps I can release it.
> But I don't know how to release it either

What you're seeing is the standard way postgresql handles transactins.
Any error in a transaction, and all of it is rolled back. Since the
database knows it's going to roll back everything, when you tell it to
do something without ending the transaction, it emits this error,
telling you that whatever your asking it to do ain't gonna get done.

begin starts a transaction, rollback ends one and rolls back all
changes, commit commits the changes IF THERE WERE NO ERRORS (note that
savepoints allow you to work around this limitation).

There's a chapter on this behavior in the manual, under something to do
with transactions...

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2005-09-01 15:59:31 Re: Transaction error
Previous Message Tom Lane 2005-09-01 15:48:49 Re: Order By for aggregate functions (Simulating Group_concat)