v22-0007-BitmapHeapScan-Make-prefetch-sync-error-more-det.patch

text/x-patch

Filename: v22-0007-BitmapHeapScan-Make-prefetch-sync-error-more-det.patch
Type: text/x-patch
Part: 6
Message: Re: BitmapHeapScan streaming read user and prelim refactoring

Patch

Format: format-patch
Series: patch v22-0007
Subject: BitmapHeapScan: Make prefetch sync error more detailed
File+
src/backend/executor/nodeBitmapHeapscan.c 1 1
From ea44146463a724f54c03bf2a27cc42983572c8a0 Mon Sep 17 00:00:00 2001
From: Melanie Plageman <melanieplageman@gmail.com>
Date: Mon, 10 Jun 2024 12:40:58 -0400
Subject: [PATCH v22 07/19] BitmapHeapScan: Make prefetch sync error more
 detailed

Add the prefetch and current block numbers to the error message emitted
when the prefetch iterator gets out of sync with the main iterator in
serial bitmap table scan.
---
 src/backend/executor/nodeBitmapHeapscan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/backend/executor/nodeBitmapHeapscan.c b/src/backend/executor/nodeBitmapHeapscan.c
index 9c156787770..33e4ef13bd6 100644
--- a/src/backend/executor/nodeBitmapHeapscan.c
+++ b/src/backend/executor/nodeBitmapHeapscan.c
@@ -251,7 +251,7 @@ new_page:
 		if (node->pstate == NULL &&
 			!node->prefetch_iterator.exhausted &&
 			node->pfblockno < node->blockno)
-			elog(ERROR, "prefetch and main iterators are out of sync");
+			elog(ERROR, "prefetch and main iterators are out of sync. pfblockno: %d. blockno: %d", node->pfblockno, node->blockno);
 
 		/* Adjust the prefetch target */
 		BitmapAdjustPrefetchTarget(node);
-- 
2.34.1