pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jeff Frost <jeff@frostconsultingllc.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: update before drop causes OID problems in transaction?
Date: Sat, 18 Mar 2006 01:55:05 -0500
Message-ID: <13832.1142664905@sss.pgh.pa.us> (raw)
In-Reply-To: <Pine.LNX.4.64.0603172233140.11424@discord.dyndns.org>
References: <Pine.LNX.4.64.0603171434230.11424@discord.dyndns.org>
	<10754.1142635969@sss.pgh.pa.us>
	<Pine.LNX.4.64.0603171454170.11424@discord.dyndns.org>
	<Pine.LNX.4.64.0603172012190.11424@discord.dyndns.org>
	<13574.1142663266@sss.pgh.pa.us>
	<Pine.LNX.4.64.0603172233140.11424@discord.dyndns.org>

Jeff Frost <jeff@frostconsultingllc.com> writes:
> On Sat, 18 Mar 2006, Tom Lane wrote:
>> 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.

> Is that the case whether the triggers are executed or not?

If the trigger function hasn't ever been executed in the current
session, it wouldn't have a cached plan ... but I suspect you meant
"if it hasn't been executed in the current transaction", and that
doesn't help.

> However, we drop that trigger before 
> dropping credit_card_audit, so I'd think that would be ok.

IIRC you'd have to drop the underlying plpgsql function, not only
the trigger object that connects the function to a table.  We cache
stuff with respect to the function.

			regards, tom lane



view thread (14+ messages)  latest in thread

Message-ID: <13832.1142664905@sss.pgh.pa.us>
Permalink:  ../13832.1142664905@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/13832.1142664905@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, jeff@frostconsultingllc.com
  Subject: Re: update before drop causes OID problems in transaction?
  In-Reply-To: <13832.1142664905@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox