Re: Assertion failure with a subtransaction and cursor

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: PostgreSQL Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Assertion failure with a subtransaction and cursor
Date: 2009-12-02 21:59:50
Message-ID: 23080.1259791190@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> writes:
> The logical next step would be to get rid of the interXact concept
> altogether and always associate temporary files with the current
> resource owner; the caller should switch to a sufficiently long-lived
> one before calling.

That would mean having a session-lifespan resource owner, which doesn't
seem amazingly useful to me: we have no other resource types for which
that would be even a little bit sane. I'm inclined to leave the temp
file API as nearly as possible as-is. Having it attach only xact-local
files to the CurrentResourceOwner sounds fine to me.

One thought here is that my inclination would be to keep
CleanupTemporaryFiles in place and have it just look for temp files that
didn't get closed, as a debugging aid. This is comparable to the
behavior of other modules that are mostly driven by resource managers.
We didn't take out the end-of-xact checks when we added resource manager
support elsewhere, and I'm not inclined to do that here. I agree we
don't need an EOSubXact-time crosscheck, though.

Other than that quibble it looks sane from here.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Michal Pasternak 2009-12-02 22:31:37 BUG #5227: please add a divide operator for intervals
Previous Message Heikki Linnakangas 2009-12-02 21:46:19 Re: Assertion failure with a subtransaction and cursor