Re: Let's drop two obsolete features which are bear-traps for novices - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Let's drop two obsolete features which are bear-traps for novices
Date
Msg-id 7903.1414866791@sss.pgh.pa.us
Whole thread Raw
In response to Re: Let's drop two obsolete features which are bear-traps for novices  (Andres Freund <andres@2ndquadrant.com>)
List pgsql-hackers
Andres Freund <andres@2ndquadrant.com> writes:
> On 2014-11-01 14:19:22 -0400, Andrew Dunstan wrote:
>> Isn't the planner still going to try to use the index in that case? If it's
>> not then I'd be OK with it, but if it's going to make the table largely
>> unusable until it's reindexed that would be rather sad.

> Both the planner (for querying) and the executor (to avoid inserting
> tuples into the index) would have to query the state of such indexes. I
> don't think it can reasonably work otherwise.

The executor doesn't need to know anything, since the AM can trivially
make aminsert be a no-op if the index is internally invalid.  The planner
only needs to know something if we think that silently being slow for a
query meant to search the index is better than throwing an error reminding
the user that the index needs to be reindexed.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Let's drop two obsolete features which are bear-traps for novices
Next
From: Andres Freund
Date:
Subject: Re: Let's drop two obsolete features which are bear-traps for novices