Re: Autonomous Transaction (WIP)

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Atri Sharma <atri(dot)jiit(at)gmail(dot)com>
Cc: Rajeev rastogi <rajeev(dot)rastogi(at)huawei(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Autonomous Transaction (WIP)
Date: 2014-04-07 10:20:47
Message-ID: CAFj8pRAaorgwwyEJzq_M5yVY1MVex3zmkO39DNo594dc7WdCPg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2014-04-07 12:16 GMT+02:00 Atri Sharma <atri(dot)jiit(at)gmail(dot)com>:

>
>
>
> On Mon, Apr 7, 2014 at 3:41 PM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>wrote:
>
>>
>>
>>
>> 2014-04-07 11:59 GMT+02:00 Rajeev rastogi <rajeev(dot)rastogi(at)huawei(dot)com>:
>>
>> On 07 April 2014 12:12, Pavel Stehule wrote:
>>>
>>> >+1 for feature
>>>
>>> Thanks
>>>
>>>
>>>
>>> >-1 for Oracle syntax - it is hardly inconsistent with Postgres
>>>
>>> We can discuss and come out with the syntax based on everyone agreement.
>>>
>>> >Autonomous transactions should be used everywhere - not only in plpgsql
>>>
>>>
>>>
>>> Yes you are right. I am not planning to support only using plpgsql.
>>> Initially we can support this
>>>
>>> Using the standalone SQL-commands and then later we can enhance based on
>>> this infrastructure
>>>
>>> to be used using plpgsql, triggers.
>>>
>>
>> ok
>>
>> long time I though about this feature.
>>
>> I am thinking so this should be fully isolated transaction - it should
>> not be subtransaction, because then you can break database consistency - RI
>>
>>
>>
> I am missing something here, but how does making it a subtransaction break
> consistency? Isnt that what should actually be happening so that the
> autonomous transaction's changes are actually visible till the parent
> transaction commits?
>

commit of autonomous transaction doesn't depends on outer transaction. So
anything what you can do, should be independent on outer transaction.

Pavel

>
> What am I missing here?
>
> Regards,
>
> Atri
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2014-04-07 12:42:24 Re: automatically updating security barrier views
Previous Message Andres Freund 2014-04-07 10:19:36 Re: Autonomous Transaction (WIP)