Re: nested xacts and phantom Xids - Mailing list pgsql-patches

From Alvaro Herrera
Subject Re: nested xacts and phantom Xids
Date
Msg-id 20040629201756.GA22115@dcc.uchile.cl
Whole thread Raw
In response to nested xacts and phantom Xids  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
List pgsql-patches
On Tue, Jun 29, 2004 at 03:22:52PM -0400, Tom Lane wrote:
> Alvaro Herrera <alvherre@dcc.uchile.cl> writes:
> > - GUC vars are rolled back on subxact abort
>
> This did not work very well, but here is a revised GUC patch that I think
> does work.  It requires xact.c to export a function to report the
> current nesting depth, and requires AtEOXact_GUC to be called in all
> four cleanup paths (main and subxact commit and abort).

Very cool, thank you.  I had thought about doing something like this but
in the end I got scared away of changing too much code here.


> BTW, why do you have assign_transaction_read_only() in your patch?  It
> seems to me to be useful to create a readonly subxact of a read-write
> outer transaction.  Or is that just not-done-yet?

Nah, it's a leftover from back when there wasn't any way to roll back
GUC vars.  I thought it should be handled similarly to the way the
isolation level should be handled.  With your patch I think it can be
ripped away entirely.

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
Officer Krupke, what are we to do?
Gee, officer Krupke, Krup you! (West Side Story, "Gee, Officer Krupke")


pgsql-patches by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: plperl patch
Next
From: Simon Riggs
Date:
Subject: Re: PITR Archive Recovery