Re: Extension tracking temp table and causing update failure - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Extension tracking temp table and causing update failure
Date
Msg-id 20361.1331158105@sss.pgh.pa.us
Whole thread Raw
In response to Re: Extension tracking temp table and causing update failure  (Phil Sorber <phil@omniti.com>)
List pgsql-bugs
Phil Sorber <phil@omniti.com> writes:
> On Wed, Mar 7, 2012 at 1:46 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> 1. If you forget to drop the temp table before ending the script,
>> then when the session ends and the temp table is forcibly dropped,
>> the whole extension goes away (following the rule that a forced drop
>> of an extension member makes the whole extension go away).  This is
>> mildly annoying, but since not dropping the temp table is a clear bug
>> in an extension script, I think we can live with it.

> This seems a little bit more than mildly annoying to me.

Well, I didn't say it wasn't annoying, but it would only be catastrophic
if applied to a production database; and it's certainly the sort of
thing you'd notice while testing the extension script.  Keep in mind
that those scripts run as superuser, so they can already do arbitrary
amounts of damage to your DB if inadequately tested.

If there were a reasonably non-ugly way to deal with the case I'd be
willing to put it in, but I don't see one.  I think the best we can do
is document it.

The other case, which only triggers if the script is run in a previously
virgin backend ID, scares me a lot more because it's the kind of corner
case that could easily escape reasonable testing of an extension script.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: [GENERAL] Altering a table with a rowtype column
Next
From: Tom Lane
Date:
Subject: Re: BUG #6480: NLS text width problem