Re: Autonomous Transaction (WIP)

From: Rajeev rastogi <rajeev(dot)rastogi(at)huawei(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Autonomous Transaction (WIP)
Date: 2014-06-27 11:22:53
Message-ID: BF2827DCCE55594C8D7A8F7FFD3AB7713DE0F537@SZXEML508-MBX.china.huawei.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 Content-Type Size
autonomous_tx_v3.patch application/octet-stream 130.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2014-06-27 11:45:23 Re: idle_in_transaction_timeout
Previous Message Andres Freund 2014-06-27 11:22:25 Re: pg_receivexlog add synchronous mode