Re: Nested xacts: looking for testers and review - Mailing list pgsql-hackers

From Stephan Szabo
Subject Re: Nested xacts: looking for testers and review
Date
Msg-id 20040612105112.X91608@megazone.bigpanda.com
Whole thread Raw
In response to Re: Nested xacts: looking for testers and review  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
List pgsql-hackers
On Sat, 12 Jun 2004, Alvaro Herrera wrote:

> On Sat, Jun 12, 2004 at 10:27:15AM -0700, Stephan Szabo wrote:
>
> > As a question, what was the general assumption about what the following
> > should do (using a modification of the original test case)?
>
> [...]
>
> > Should the statement at (1) fail because the constraint is not immediately
> > satisfied, or should it pass because the set constraints all immediate was
> > part of a subtransaction that didn't commit?
>
> I think the correct answer should be that (1) should pass because the
> all immediate set would be rolled back.  However, GUC vars do not
> presently roll back so it doesn't work.  In fact, if GUC vars do roll
> back, then there is no need to explicitly set all constraints to
> deferred, because it would roll back to that value automatically.
>
> GUC vars are the remaining item for correct nested xacts AFAICS.

AFAIK, SET CONSTRAINTS isn't modifying a GUC variable, it gets turned into
a command that goes to DeferredTriggerSetState in trigger.c.



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: File leak?
Next
From: Tom Lane
Date:
Subject: Re: Bug in RENAME TO?