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

From Craig Ringer
Subject Re: Autonomous Transaction (WIP)
Date
Msg-id 53424AB5.6010506@2ndquadrant.com
Whole thread Raw
In response to Autonomous Transaction (WIP)  (Rajeev rastogi <rajeev.rastogi@huawei.com>)
Responses Re: Autonomous Transaction (WIP)  (Ian Barwick <ian@2ndquadrant.com>)
Re: Autonomous Transaction (WIP)  (Rajeev rastogi <rajeev.rastogi@huawei.com>)
List pgsql-hackers
On 04/07/2014 12:06 PM, Rajeev rastogi wrote:


> Syntax to create autonomous transaction can be as:
> 
>                         */PRAGMA AUTONOMOUS TRANSACTION;/*

Wouldn't you want to use SET TRANSACTION for this?

Or a suffix on BEGIN, like BEGIN AUTONOMOUS TRANSACTION ?

What's the logic behind introducing "PRAGMA" ?


If you wanted to use that syntax for Oracle compatibility you'd need to use:
   PRAGMA AUTONOMOUS_TRANSACTION;

(note underscore). But really, this would no be a pragma at all,
PostgreSQL doesn't really have the concept. Calling it that would just
be misleading.




> *_Starting of Autonomous  Transaction:_*
> 
> Starting of autonomous transaction will be exactly same as starting
> sub-transaction.

If you don't want it to dirty read data from the parent tx, or inherit
parent locks, then it cannot be the same at all.

> 2.      Freeing of all resource and popping of previous transaction
> happens in the same way as sub-transaction.

I'm not sure what you mean here.


Overall, this looks like a HUGE job to make work well. I know some
others have been doing work along the same lines, so hopefully you'll be
able to collaborate and share ideas.

-- Craig Ringer                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services



pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: Autonomous Transaction (WIP)
Next
From: Craig Ringer
Date:
Subject: Re: Pending 9.4 patches