Re: autonomous transactions

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: autonomous transactions
Date: 2016-10-06 20:53:28
Message-ID: CANP8+jLRrxyXX3wjn9UG7W0HLdU4HD-qfySrjAXFs5DmwvVV7A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 6 October 2016 at 21:27, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:

>> * The labelling "Autonomous Transaction" is a simple coat of paint,
>> which can easily be transferred to a better implementation if one
>> comes. If one doesn't then its better to have something than nothing.
>> So I suggest we commit Background Transactions first and then in a
>> fairly thin commit, implement Autonomous Transactions on top of it for
>> now and if we get a better one, switch it over.
>
> I think we should implement background transactions and call them
> background transactions. That allows us to expose additional
> functionality which is useful, like the ability to kick something off
> and check back later for the results. There's no reason to call it
> background transactions and also call it autonomous transactions: one
> feature doesn't need two names.

For myself, I don't care what you call it.

I just want to be able to invoke it by saying PRAGMA AUTONOMOUS_TRANSACTION;
and I know many others do also.
If a better implementation emerges I would happily replace this one
with another.

I'm happy to also invoke it via an alternate mechanism or API, so that
it can continue to be used even if the above mechanism changes.

We have no need to wait for the perfect solution, even assuming we
would ever agree that just one exists.

--
Simon Riggs http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2016-10-06 21:07:28 Re: Switch to unnamed POSIX semaphores as our preferred sema code?
Previous Message Jeff Janes 2016-10-06 20:40:58 Re: pgbench vs. wait events