Re: Query plan not updated after dropped index

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Victor Blomqvist <vb(at)viblo(dot)se>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Query plan not updated after dropped index
Date: 2016-02-18 15:05:31
Message-ID: 26415.1455807931@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Victor Blomqvist <vb(at)viblo(dot)se> writes:
> We just had a major issue on our databases, after a index was replaced a
> user defined function didnt change its query plan to use the new index.

I'm suspicious that this is some variant of the problem discussed a couple
days ago:

http://www.postgresql.org/message-id/flat/CAKt_ZfsvdE3WiHUjg81MT1KzOkebqz_bg=DBHf4L6rkfjtEJ_w(at)mail(dot)gmail(dot)com

However, that theory requires that the index not have been immediately
usable, which implies that it initially had some broken HOT chains,
which really should not have happened if you were simply replacing one
index with an identical one. (The pre-existing index should've been
enough to ensure HOT chain consistency for its columns.)

Perhaps you were doing something "cute" like replacing a single-column
index with a multi-column one?

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Melvin Davidson 2016-02-18 15:15:07 Re: Multiple databases and shared_buffers
Previous Message Mark Rotteveel 2016-02-18 13:36:50 Re: JDBC behaviour