aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/heap/heapam_handler.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/access/heap/heapam_handler.c')
-rw-r--r--src/backend/access/heap/heapam_handler.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/backend/access/heap/heapam_handler.c b/src/backend/access/heap/heapam_handler.c
index 0755be83901..5a17112c91e 100644
--- a/src/backend/access/heap/heapam_handler.c
+++ b/src/backend/access/heap/heapam_handler.c
@@ -2132,9 +2132,11 @@ heapam_scan_bitmap_next_block(TableScanDesc scan,
* Ignore any claimed entries past what we think is the end of the
* relation. It may have been extended after the start of our scan (we
* only hold an AccessShareLock, and it could be inserts from this
- * backend).
+ * backend). We don't take this optimization in SERIALIZABLE isolation
+ * though, as we need to examine all invisible tuples reachable by the
+ * index.
*/
- if (block >= hscan->rs_nblocks)
+ if (!IsolationIsSerializable() && block >= hscan->rs_nblocks)
return false;
/*