From e4c54efb9aa77ada072c472de6bd5d0cdbf34b6c Mon Sep 17 00:00:00 2001
From: Melanie Plageman <melanieplageman@gmail.com>
Date: Sat, 6 Apr 2024 14:49:45 -0400
Subject: [PATCH v19 14/21] Add table AM callbacks for Bitmap Table Scans

Add specialized functions for starting, restarting, and ending a Bitmap
Table Scan.
---
 src/include/access/tableam.h | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/src/include/access/tableam.h b/src/include/access/tableam.h
index b4b7fa13948..15f3db4113a 100644
--- a/src/include/access/tableam.h
+++ b/src/include/access/tableam.h
@@ -355,6 +355,24 @@ typedef struct TableAmRoutine
 								bool set_params, bool allow_strat,
 								bool allow_sync, bool allow_pagemode);
 
+	/*
+	 * Functions to begin, restart, and end a scan of the underlying table of
+	 * a bitmap table scan.
+	 *
+	 * `rel`, `flags`, and `snapshot` serve the same purposes as in the
+	 * standard relation scan_[begin|rescan|end] functions documented above.
+	 */
+	TableScanDesc (*scan_begin_bm) (Relation rel,
+									Snapshot snapshot,
+									uint32 flags);
+
+	void		(*scan_rescan_bm) (TableScanDesc scan);
+
+	/*
+	 * Release resources and deallocate scan.
+	 */
+	void		(*scan_end_bm) (TableScanDesc scan);
+
 	/*
 	 * Return next tuple from `scan`, store in slot.
 	 */
-- 
2.40.1

