pgsql: BitmapHeapScan: Remove incorrect assert and reset field

Поиск
Список
Период
Сортировка
От Melanie Plageman
Тема pgsql: BitmapHeapScan: Remove incorrect assert and reset field
Дата
Msg-id E1s7cgC-000VL7-QG@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
BitmapHeapScan: Remove incorrect assert and reset field

04e72ed617be pushed the skip fetch optimization (allowing bitmap heap
scans to operate like index-only scans if none of the underlying data is
needed) into heap AM implementations of bitmap table scan callbacks.

04e72ed617be added an assert that all tuples in blocks eligible for the
optimization had been NULL-filled and emitted by the end of the scan.
This assert is incorrect when not all tuples need be scanned to execute
the query; for example: a join in which not all inner tuples need to be
scanned before skipping to the next outer tuple.

Remove the assert and reset the field on which it previously asserted to
avoid incorrectly emitting NULL-filled tuples from a previous scan on
rescan.

Author: Melanie Plageman
Reviewed-by: Tomas Vondra, Michael Paquier, Alvaro Herrera
Reported-by: Melanie Plageman
Reproduced-by: Tomas Vondra, Richard Guo
Discussion: https://postgr.es/m/CAMbWs48orzZVXa7-vP9Nt7vQWLTE04Qy4PePaLQYsVNQgo6qRg%40mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/a3e6c6f929912f928fa405909d17bcbf0c1b03ee

Modified Files
--------------
src/backend/access/heap/heapam.c   |  9 ++++++---
src/test/regress/expected/join.out | 36 ++++++++++++++++++++++++++++++++++++
src/test/regress/sql/join.sql      | 24 ++++++++++++++++++++++++
3 files changed, 66 insertions(+), 3 deletions(-)


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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: pgsql: Remove option to fall back from direct to postgres SSL negotiati
Следующее
От: Noah Misch
Дата:
Сообщение: pgsql: Fix documentation about DROP DATABASE FORCE process termination