Re: Don't understand transaction error - Mailing list pgsql-general

From Scott Marlowe
Subject Re: Don't understand transaction error
Date
Msg-id 1125589915.28179.161.camel@state.g2switchworks.com
Whole thread Raw
In response to Don't understand transaction error  ("Jonathan Villa" <jonathan@innovativesource.net>)
List 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...

pgsql-general by date:

Previous
From: Dick Kniep
Date:
Subject: Schema problems RedHat / SuSE 9.3 for version 7.4.8
Next
From: Tom Lane
Date:
Subject: Re: Order By for aggregate functions (Simulating Group_concat)