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

From Peter Eisentraut
Subject Re: Does error within transaction imply restarting it?
Date
Msg-id Pine.LNX.4.21.0004151642160.523-100000@localhost.localdomain
Whole thread Raw
In response to Re: Does error within transaction imply restarting it?  (Haroldo Stenger <hstenger@adinet.com.uy>)
Responses Re: Does error within transaction imply restarting it?
Re: Does error within transaction imply restarting it?
List pgsql-general
Haroldo Stenger writes:

> I seems that other DBMSs, don't care about erroneous statements within
> a transaction. Now, I have several paths to follow: 1) Hacking the
> backend ;-)

If you're really brave you can try this change in
backend/tcop/postgres.c:

        if (sigsetjmp(Warn_restart, 1) != 0)
        {
                time(&tim);

                if (Verbose)
                        TPRINTF(TRACE_VERBOSE, "AbortCurrentTransaction");

-               AbortCurrentTransaction();
                InError = false;
                if (ExitAfterAbort)
                {
                        ProcReleaseLocks(); /* Just to be sure... */
                        proc_exit(0);
                }
        }

Absolutely no guarantee, there's probably more to it. Hmm, I wonder, maybe
not.

> How can I motivate key developers to make their way into an action
> plan?

Becoming one yourself or throwing large amounts of cash at the existing
ones. :) Trying the above and tracing down any arising problems might be a
start though.


--
Peter Eisentraut                  Sernanders väg 10:115
peter_e@gmx.net                   75262 Uppsala
http://yi.org/peter-e/            Sweden


pgsql-general by date:

Previous
From: Stephen J Lombardo
Date:
Subject: Re: Postgresqlism & Vacuum?
Next
From: Bruce Momjian
Date:
Subject: Re: Does error within transaction imply restarting it?