pgsql: Fix bugs in GIN "fast scan" with partial match.

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема pgsql: Fix bugs in GIN "fast scan" with partial match.
Дата
Msg-id E1WYLnZ-0005KA-2M@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix bugs in GIN "fast scan" with partial match.

There were a couple of bugs here. First, if the fuzzy limit was exceeded,
the loop in entryGetItem might drop out too soon if a whole block needs to
be skipped because it's < advancePast ("continue" in a while-loop checks the
loop condition too). Secondly, the loop checked when stepping to a new page
that there is at least one offset on the page < advancePast, but we cannot
rely on that on subsequent calls of entryGetItem, because advancePast might
change in between. That caused the skipping loop to read bogus items in the
TbmIterateResult's offset array.

First item and fix by Alexander Korotkov, second bug pointed out by Fabrízio
de Royes Mello, by a small variation of Alexander's test query.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/614167c6d7e98d4538c4546754b3c2dba480f71c

Modified Files
--------------
src/backend/access/gin/ginget.c |   55 +++++++++++++++++++++++----------------
1 file changed, 32 insertions(+), 23 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Michael Meskes
Дата:
Сообщение: Re: pgsql: Several fixes to array handling in ecpg.
Следующее
От: Bruce Momjian
Дата:
Сообщение: pgsql: docs: psql '--' comments are not passed to the server