Re: 'DROP INDEX' kills stored rpocedures - Mailing list pgsql-general

From Vlad Krupin
Subject Re: 'DROP INDEX' kills stored rpocedures
Date
Msg-id 3E8C8776.6050801@echospace.com
Whole thread Raw
In response to Re: 'DROP INDEX' kills stored rpocedures  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Tom Lane wrote:

>"scott.marlowe" <scott.marlowe@ihs.com> writes:
>
>
>>Don't make assumptions like that.  In postgresql, DDL is transactionable.
>>
>>
>
>I think his actual problem is that plpgsql cached a query plan for some
>command while the index was in place, and then on a later re-execution
>of the function, it tried to re-use the cached plan.  This is a general
>problem that we know we need to fix sooner or later --- cached plans
>need to be invalidated when there are DDL changes to the underlying
>tables, views, etc.
>
that totally makes sense (in fact, I sent another message to the list 15
minutes ago guessing that this could be the case. You can ignore it now).

So, if I first re-create indexes and then do a 'VACUUM ANALYZE' on the
table where those indexes were dropped, it should discard the old cached
plans and create a new one, right?

Vlad

--
Vlad Krupin
Software Engineer
echospace.com


pgsql-general by date:

Previous
From: "Keith C. Perry"
Date:
Subject: Multiple References on one Foreign Key
Next
From: "Merlin Moncure"
Date:
Subject: Re: [HACKERS] OSS database needed for testing