Re: Portals and nested transactions - Mailing list pgsql-hackers

From Zeugswetter Andreas SB SD
Subject Re: Portals and nested transactions
Date
Msg-id 46C15C39FEB2C44BA555E356FBCD6FA40184D148@m0114.s-mxs.net
Whole thread Raw
In response to Portals and nested transactions  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
My answers:

> Q1: Should Portals successfully created within the failed subxact
> be closed?  Or should they remain open?

no for protocol level

I can understand a yes to this one for sql level, because it will be
hard to clean up by hand :-( But I like the analogy to hold cursors,
so I would also say no to sql level.

Is the pro yes argument ACID allowed here ? I thought ACID is about
data integrity and not flow control, and also deals with main transactions
and not subtransactions.

> Q2: If the subxact changed the state of a pre-existing Portal, should
> that state change roll back?  In particular, can a Close Portal
> operation roll back?

NO for both SQL and protocol level.
The analogy is imho that closing a 'hold cursor' is also never rolled back

> How to do it non-transactionally
> --------------------------------

Sounds like a good plan, but also sounds like a lot of work.

Andreas


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Point in Time Recovery
Next
From: Andreas Pflug
Date:
Subject: Re: Release planning