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