Re: index paths and enable_indexscan - Mailing list pgsql-hackers

From Richard Guo
Subject Re: index paths and enable_indexscan
Date
Msg-id CAMbWs4-+zTPg8rQUMWwfSpC_heYVsUhHcc7Sf9fvCWKSynpWvA@mail.gmail.com
Whole thread Raw
In response to index paths and enable_indexscan  (Amit Langote <amitlangote09@gmail.com>)
Responses Re: index paths and enable_indexscan  (Amit Langote <amitlangote09@gmail.com>)
List pgsql-hackers

On Tue, Apr 14, 2020 at 2:44 PM Amit Langote <amitlangote09@gmail.com> wrote:
Hi,

Maybe I am missing something obvious, but is it intentional that
enable_indexscan is checked by cost_index(), that is, *after* creating
an index path?  I was expecting that if enable_indexscan is off, then
no index paths would be generated to begin with, because I thought
they are optional.

I think the cost estimate of index paths is the same as other paths on
that setting enable_xxx to off only adds a penalty factor (disable_cost)
to the path's cost. The path would be still generated and compete with
other paths in add_path().

Thanks
Richard 

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Incremental sorts and EXEC_FLAG_REWIND
Next
From: Peter Eisentraut
Date:
Subject: Re: pgsql: Improve handling of parameter differences in physicalreplicatio