Re: Question on restoring and compiled plans

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Richard Huxton <dev(at)archonet(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Question on restoring and compiled plans
Date: 2004-03-19 15:04:35
Message-ID: 24133.1079708675@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Richard Huxton <dev(at)archonet(dot)com> writes:
> If I pg_restore a DB and don't ANALYSE before a pl/pgsql trigger activates
> then that trigger's going to be planned based on the default stats forever
> isn't it?

Only for the life of the current backend(s).

If that's still too long for you, you could do a CREATE OR REPLACE FUNCTION
that doesn't actually change anything about the trigger function; that
will force current cached plans to be thrown away.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2004-03-19 15:09:31 Re: syntax error position "CREATE FUNCTION" bug fix
Previous Message Andrew Dunstan 2004-03-19 15:04:03 Re: COPY formatting