From: | Melanie Plageman <melanieplageman(at)gmail(dot)com> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: BitmapHeapScan: Remove incorrect assert and reset field |
Date: | 2024-05-16 15:06:00 |
Message-ID: | E1s7cgC-000VL7-QG@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Noah Misch | 2024-05-16 21:15:53 | pgsql: Fix documentation about DROP DATABASE FORCE process termination |
Previous Message | Heikki Linnakangas | 2024-05-16 14:22:04 | pgsql: Remove option to fall back from direct to postgres SSL negotiati |