Re: nested xacts and phantom Xids

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: nested xacts and phantom Xids
Date: 2004-06-29 20:17:56
Message-ID: 20040629201756.GA22115@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

On Tue, Jun 29, 2004 at 03:22:52PM -0400, Tom Lane wrote:
> Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)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")

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2004-06-29 20:19:05 Re: Accessing Specific Schemas
Previous Message Peter Eisentraut 2004-06-29 19:46:34 Default libpq service

Browse pgsql-patches by date

  From Date Subject
Next Message Alvaro Herrera 2004-06-29 21:47:58 Re: nested xacts and phantom Xids
Previous Message Simon Riggs 2004-06-29 19:59:05 Re: PITR Archive Recovery