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(-)