pgsql: Fix bitmap table scan crash on iterator release - Mailing list pgsql-committers

From Melanie Plageman
Subject pgsql: Fix bitmap table scan crash on iterator release
Date
Msg-id E1tOJqE-000NlC-EP@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Fix bitmap table scan crash on iterator release

1a0da347a7ac98db replaced Bitmap Table Scan's individual private and
shared iterators with a unified iterator. It neglected, however, to
check if the iterator had already been cleaned up before doing so on
rescan. Add this check both on rescan and end scan to be safe.

Reported-by: Richard Guo
Author: Richard Guo
Discussion: https://postgr.es/m/CAMbWs48nrhcLY1kcd-u9oD%2B6yiS631F_8Fx8ZGsO-BYDwH%2Bbyw%40mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/754c610e13b820370db4c02010a4c8c5dbd1edbd

Modified Files
--------------
src/backend/executor/nodeBitmapHeapscan.c | 12 +++++++----
src/backend/nodes/tidbitmap.c             |  2 +-
src/test/regress/expected/join.out        | 35 +++++++++++++++++++++++++++++++
src/test/regress/sql/join.sql             | 17 +++++++++++++++
4 files changed, 61 insertions(+), 5 deletions(-)


pgsql-committers by date:

Previous
From: Peter Geoghegan
Date:
Subject: pgsql: Avoid nbtree index scan SAOP scanBehind confusion.
Next
From: Tom Lane
Date:
Subject: pgsql: Convert SetOp to read its inputs as outerPlan and innerPlan.