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

text/x-patch

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

Patch

Format: format-patch
Series: patch v23-0007
Subject: BitmapHeapScan: Make prefetch sync error more detailed
File+
src/backend/executor/nodeBitmapHeapscan.c 1 1
From 6244d196ddb2852b6fba69205abeaa265bdef294 Mon Sep 17 00:00:00 2001
From: Melanie Plageman <melanieplageman@gmail.com>
Date: Mon, 10 Jun 2024 12:40:58 -0400
Subject: [PATCH v23 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 aca3c1d620..b7bf877594 100644
--- a/src/backend/executor/nodeBitmapHeapscan.c
+++ b/src/backend/executor/nodeBitmapHeapscan.c
@@ -255,7 +255,7 @@ new_page:
 		if (node->pstate == NULL &&
 			!tbm_exhausted(&node->prefetch_iterator) &&
 			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