pgsql: Fix nbtree high key "continuescan" row compare bug.

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема pgsql: Fix nbtree high key "continuescan" row compare bug.
Дата
Msg-id E1hAknR-0000PU-Tu@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix nbtree high key "continuescan" row compare bug.

Commit 29b64d1d mishandled skipping over truncated high key attributes
during row comparisons.  The row comparison key matching loop would loop
forever when a truncated attribute was encountered for a row compare
subkey.  Fix by following the example of other code in the loop: advance
the current subkey, or break out of the loop when the last subkey is
reached.

Add test coverage for the relevant _bt_check_rowcompare() code path.
The new test case is somewhat tied to nbtree implementation details,
which isn't ideal, but seems unavoidable.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/76a39f2295ecb040f2ea052320941e1eb9b526c0

Modified Files
--------------
src/backend/access/nbtree/nbtutils.c          |  3 +++
src/test/regress/expected/index_including.out | 21 ++++++++++++++++++++-
src/test/regress/sql/index_including.sql      |  8 +++++++-
3 files changed, 30 insertions(+), 2 deletions(-)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Add test case exercising formerly-unreached code ininheritance_
Следующее
От: Andres Freund
Дата:
Сообщение: pgsql: tableam: bitmap table scan.