Re: [PATCH] Check that index can return in get_actual_variable_range()
От | Maxime Schoemans |
---|---|
Тема | Re: [PATCH] Check that index can return in get_actual_variable_range() |
Дата | |
Msg-id | 2BE82474-30B1-4AA6-B1E7-97B33F9FA428@enterprisedb.com обсуждение исходный текст |
Ответ на | Re: [PATCH] Check that index can return in get_actual_variable_range() (Mark Dilger <mark.dilger@enterprisedb.com>) |
Список | pgsql-hackers |
On 18 Sep 2025, at 15:36, Mark Dilger <mark.dilger@enterprisedb.com> wrote: > > Testing with the src/test/modules/treeb work in the patch series at [1], modifying treebcanreturn() to always return falseand modifying _treeb_first(), _treeb_next(), and _treeb_endpoint() to set scan->xs_itup to NULL rather than to a tuple,without the patch there are a number of test failures with "ERROR: no data returned for index-only scan", but withthe patch applied those errors still appear. They are raised by nodeIndexonlyscan.c at line 213, inside IndexOnlyNext(),suggesting that changing treebcanreturn() to return false was not enough to dissuade the planner from choosingthe index for an index only scan. > > Is there a bug in how the system selects an index for an index-only scan? Or is the combination amcanorder=true && amcanreturn=NULL/falsenot a valid choice for an index? If the latter, shouldn't there be a check for that somewhere, orat least an Assert()? After a short offline discussion with Mark, we determined that this issue was due to treebproperty still returning true forthe AMPROP_RETURNABLE property. This was a small oversight in the testing, but does not indicate a bug in postgres.
В списке pgsql-hackers по дате отправления: