On 04/09/2014 08:44 AM, Pavan Deolasee wrote:
I would hope most of this to be solved by having one (read only) virtual transaction and
then juggling the ATs in a way similar to current subtransaction machinery.
The main differences would be that:
A) the top level transaction stays virtual
and
B) ATs are committed independantly
This would be greatly simplified if we can accept the restriction that there is only single
snapshot per backend (not per transaction). To me this seems a completely sensible restriction.
Re syntax, I think we need a way to name the transactions so we can have a way
to switch between multiple parallel active autonomous transactions.
-----
BEGIN TRANSACTION myfirsttransaction;
do something in myfirsttransaction;
BEGIN TRANSACTION anothertransaction;
do something in anothertransaction;
SET TRANSACTION myfirsttransaction;
more work in myfirsttransaction;
ROLLBACK anothertransaction;
COMMIT; -- or COMMIT myfirsttransaction;
----
Cheers
Hannu