Re: pl/python explicit subtransactions

From: Jan Urbański <wulczer(at)wulczer(dot)org>
To: Steve Singer <ssinger(at)ca(dot)afilias(dot)info>
Cc: Postgres - Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pl/python explicit subtransactions
Date: 2011-02-06 16:40:25
Message-ID: 4D4ECEF9.4080600@wulczer.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 02/02/11 14:16, Steve Singer wrote:
> On 11-01-27 05:11 PM, Jan Urbański wrote:
>> On 23/12/10 15:32, Jan Urbański wrote:
>>> Here's a patch implementing explicitly starting subtransactions
>>> mentioned in
>>> http://archives.postgresql.org/pgsql-hackers/2010-12/msg01991.php. It's
>>> an incremental patch on top of the spi-in-subxacts patch sent eariler.
>>
>> Updated to the spi-in-subxacts version sent earlier.
>>
>
> Submission Review
> -----------------
>
> The patch applies against master.
> Test updates are included.
>
> The patch doesn't included any documentation updates. The author did
> mention that he'll do these if it looks like the patch is going to be
> accepted.

PFA an updated patch with documentation.

> The plpython_subxact regression test you addded is failing on both
> python3 and 2.4 for me. It seems to be creating functions with the same
> name twice and the second time is failing with "ERROR: function ....."
> already exists. I think this is just an issue with your expect files.

The expect files for older Pythons were broken by the change to include
HINT and DETAIL messages when errors are reported from Python. I fixed
them and now the regression tests are passing for me on Python 2.4, 2.6
and 3.1.

> Code Review
> ------------
>
>
> PLy_abort_open_subtransactions(...) line 1215:
>
> ereport(WARNING,
> (errmsg("Forcibly aborting a subtransaction "
> "that has not been exited")));
>
> "Forcibly" should be "forcibly" (lower case)
>
> Similarly in PLy_subxact_enter and PLy_subxact_exit a few
> PLy_exception_set calls start with an upper case character when I think
> we want it to be lower case.

Yeah, changed them.

Thanks,
Jan

Attachment Content-Type Size
plpython-explicit-subxacts.diff text/x-patch 54.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2011-02-06 16:44:12 Re: SSI patch version 14
Previous Message Bruce Momjian 2011-02-06 16:16:31 Re: multiple -f support