Re: update before drop causes OID problems in transaction? - Mailing list pgsql-sql

From Tom Lane
Subject Re: update before drop causes OID problems in transaction?
Date
Msg-id 13574.1142663266@sss.pgh.pa.us
Whole thread Raw
In response to Re: update before drop causes OID problems in transaction?  (Jeff Frost <jeff@frostconsultingllc.com>)
Responses Re: update before drop causes OID problems in transaction?
List pgsql-sql
Jeff Frost <jeff@frostconsultingllc.com> writes:
> I suspect I've answered my own question while preparing the test case. Is it 
> the use of pg_get_serial_sequence at the bottom of the transaction?  If so, 
> why does it only have a problem when there is an update to credit_card_audit 
> in the transaction?

No, I think it's that you've got a plpgsql trigger function that
contains queries referring to credit_card_audit.  Dropping and
recreating that table invalidates plpgsql's cached plans for those
queries.

We do have in mind to fix this (Neil Conway was poking at it, last
I heard) but it won't happen before 8.2 at the earliest.  In the
meantime I'm wondering why you are insistent on dropping and recreating
credit_card_audit, as opposed to something less invasive like TRUNCATE.
        regards, tom lane


pgsql-sql by date:

Previous
From: Jeff Frost
Date:
Subject: Re: update before drop causes OID problems in transaction?
Next
From: Tom Lane
Date:
Subject: Re: update before drop causes OID problems in transaction?