Re: Autonomous Transaction (WIP) - Mailing list pgsql-hackers

From Rajeev rastogi
Subject Re: Autonomous Transaction (WIP)
Date
Msg-id BF2827DCCE55594C8D7A8F7FFD3AB7713DE0F537@SZXEML508-MBX.china.huawei.com
Whole thread Raw
In response to Re: Autonomous Transaction (WIP)  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: Autonomous Transaction (WIP)  (Abhijit Menon-Sen <ams@2ndQuadrant.com>)
List pgsql-hackers

On 24 June 2014 22:18, Pavel Stehule Wrote:

 

Thanks for looking into this patch.

 

>There are lot of unnecessary block over one statement in code

>+               if ((inAutoX) && (chunk == events->head) && ((char *)event < afterTriggers->events_stack[my_level].tailfree))
>+               {
>+                       continue;
>+               }
>+

>and there a few too long lines

I have removed unnecessary blocks and long lines are broken in shorted lines.


>     plancache                ... ok
>     limit                    ... ok
>     plpgsql                  ... ok
>     copy2                    ... ok
>     temp                     ... FAILED
>     domain                   ... ok
>     rangefuncs               ... ok
>     prepare                  ... ok
>     without_oid              ... ok
>     conversion               ... ok
>     truncate                 ... ok
>     alter_table              ... ok
>     sequence                 ... ok

Fixed the regression test failure.

>I did some small tests and it works well. When I looked to code, I was surprised by hardcoded max nesting level of autonomous transactions

>#define     MAX_AUTOX_NESTING_LEVEL   3

>why? Is not it too restrictive?

Yes you are right. I had plan to make it configurable parameters but wanted to take feedback of community. Please let me know if configurable

parameter with minimum value as zero (which is also default value to disable this feature) and maximum as 100 will be OK.? In current patch this

Change is not available.

Apart from the issue reported by you, in the latest patch I have also added support for local transaction ID for autonomous transaction also, as it has dependency on

CONCURRENT INDEX and CHECKPOINT.

 

Updated patch is attached.

 

Thanks and Regards,

Kumar Rajeev Rastogi

Attachment

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: pg_receivexlog add synchronous mode
Next
From: Robert Haas
Date:
Subject: Re: idle_in_transaction_timeout