Skip site navigation (1) Skip section navigation (2)

Re: autonomous transactions

From: Neil Conway <neilc(at)samurai(dot)com>
To: Gregory Stark <stark(at)enterprisedb(dot)com>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, "Roberts, Jon" <Jon(dot)Roberts(at)asurion(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: autonomous transactions
Date: 2008-01-23 22:35:32
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Wed, 2008-01-23 at 09:30 +0000, Gregory Stark wrote:
> I think the hard part would be error handling. You have to be able to catch
> any errors and resume the outer transaction.

I agree that you'd need to do this, but I don't follow why it would be
particularly difficult. You essentially have a stack of active
transactions (since one autonomous transaction can start another
autonomous transaction, and so forth). If you encounter an error in the
current transaction, you abort it as normal, pop the stack, and resume
execution of the originating transaction.

I think the hard part is fixing the parts of the backend that assume
that a single process can only have a single top-level transaction in
progress at a given time.


In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2008-01-23 22:50:02
Subject: Re: autonomous transactions
Previous:From: Simon RiggsDate: 2008-01-23 21:32:59
Subject: Re: autonomous transactions

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group