Skip site navigation (1) Skip section navigation (2)

Re: pl/python explicit subtransactions

From: Jan Urbański <wulczer(at)wulczer(dot)org>
To: Steve Singer <ssinger_pg(at)sympatico(dot)ca>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Postgres - Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pl/python explicit subtransactions
Date: 2011-02-10 10:20:06
Message-ID: 4D53BBD6.7050507@wulczer.org (view raw or flat)
Thread:
Lists: pgsql-hackers
On 10/02/11 01:26, Steve Singer wrote:
> On 11-02-09 05:22 PM, Peter Eisentraut wrote:
>> On tis, 2011-02-08 at 00:32 -0500, Steve Singer wrote:
>> Is it necessarily a good idea that an explicit subtransaction disables
>> the implicit sub-subtransactions?  It might be conceivable that you'd
>> still want to do some try/catch within explicit subtransactions.
>>
> 
> I had tested nested subtransactions but not a normal try/catch within a
> subtransaction.  That sounds reasonable to allow.
> 
> Unfortunately it leads to:
> 
> [crash]

D'oh, I was thinking about whether it's safe to skip the internal
subxact if you're in an implicit one and somehow I always convinced
myself that since you eventually close the explicit one, it is.

Obviously my testing wasn't enough :( Attaching an updated patch with
improved docs incorporating Steve's fixes, and fixes & tests for not
statring the implicit subxact. That actually makes the patch a bit
smaller ;) OTOH I had to remove the section from the docs that claimed
performance improvement due to only starting the explicit subxact...

Cheers,
Jan

Attachment: plpython-explicit-subxacts.diff
Description: text/x-patch (49.7 KB)

In response to

Responses

pgsql-hackers by date

Next:From: Andrew DunstanDate: 2011-02-10 10:29:47
Subject: Re: SSI patch version 14
Previous:From: Heikki LinnakangasDate: 2011-02-10 10:09:33
Subject: Re: SSI patch version 14

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group