Re: Does error within transaction imply restarting it? - Mailing list pgsql-general

From Ed Loehr
Subject Re: Does error within transaction imply restarting it?
Date
Msg-id 38F771AB.1D68601D@austin.rr.com
Whole thread Raw
In response to Does error within transaction imply restarting it?  (Haroldo Stenger <hstenger@adinet.com.uy>)
List pgsql-general
Haroldo Stenger wrote:
>
> Hello dear fellows,
>
> I need to get insight about this:
>
> 1. A transaction begins
> 2. LOCK TABLE XYZ; is issued.
> 3. Since table XYZ doesn't exist, the backend gives error.
> 4. A CREATE TABLE XYZ(field char); is issued.
> 5. The backend says that it is in abort state, and that all queries will
> be ignored until commit, or end of transaction.
>
> Is this behaviour unavoidable?

This is problematic (and arguably non-standard) handling of an error within
a transaction, and is a problem for precisely the reason you experienced.
At last check, it appeared some of the key developers might have been
coming around to that understanding, though I'm not sure it has made its
way into any kind of action plan.

Regards,
Ed Loehr

pgsql-general by date:

Previous
From: Brian Neal
Date:
Subject: Re: database file size bloat
Next
From: Haroldo Stenger
Date:
Subject: Re: Does error within transaction imply restarting it?