Re: Does error within transaction imply restarting it?

From: Ed Loehr <eloehr(at)austin(dot)rr(dot)com>
To: Haroldo Stenger <hstenger(at)adinet(dot)com(dot)uy>
Cc: postgres general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Does error within transaction imply restarting it?
Date: 2000-04-14 19:29:47
Message-ID: 38F771AB.1D68601D@austin.rr.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ed Loehr 2000-04-14 19:33:25 Re: PostgreSQL (fwd)
Previous Message Brian Neal 2000-04-14 19:19:20 Re: database file size bloat