Re: Assertion failure with a subtransaction and cursor

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, PostgreSQL Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Assertion failure with a subtransaction and cursor
Date: 2009-12-02 20:04:55
Message-ID: 20091202200454.GE6276@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Tom Lane wrote:
> Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> writes:
> > Tom Lane wrote:
> >> Not sure what to do. The only fix that seems bulletproof at the moment
> >> is to declare that any cursor that's been touched at all in a
> >> subtransaction is marked "broken" if the subtransaction rolls back.
> >> That might be too great a loss of functionality. It would block off
> >> the controversial aspects of behavior though ...
>
> > Hmm, I think we should track temporary files using resource owners.
>
> That would probably be a workable solution if temp files are the only
> problem. What I'm afraid of is that this type of problem exists
> *everywhere* that we track the need for cleanup operations using the
> assumption that subtransactions are nested. If that's the case then we
> are looking at a very major rewrite to make things bulletproof --- much
> larger than I'd feel comfortable back-patching, especially so far back
> as 8.0. I'm thinking we might have little choice but to disable the
> functionality in back branches.

Hmm, the reason we didn't disable it is that people requested it
explicitely. In fact IIRC we had this very same discussion years ago,
except without the crashing test case. I fear that if it gets disabled,
some people will be upset.

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2009-12-02 20:14:37 Re: Assertion failure with a subtransaction and cursor
Previous Message Tom Lane 2009-12-02 18:59:08 Re: Assertion failure with a subtransaction and cursor