From 7b4ac19982a77a1a2a6f096c4a11ee7325a14d2c Mon Sep 17 00:00:00 2001 From: Robert Haas Date: Tue, 24 Jan 2017 16:42:58 -0500 Subject: Extend index AM API for parallel index scans. This patch doesn't actually make any index AM parallel-aware, but it provides the necessary functions at the AM layer to do so. Rahila Syed, Amit Kapila, Robert Haas --- src/include/access/amapi.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/include/access/amapi.h') diff --git a/src/include/access/amapi.h b/src/include/access/amapi.h index 6a5f279e7f9..e91e41dc0f4 100644 --- a/src/include/access/amapi.h +++ b/src/include/access/amapi.h @@ -137,6 +137,18 @@ typedef void (*ammarkpos_function) (IndexScanDesc scan); /* restore marked scan position */ typedef void (*amrestrpos_function) (IndexScanDesc scan); +/* + * Callback function signatures - for parallel index scans. + */ + +/* estimate size of parallel scan descriptor */ +typedef Size (*amestimateparallelscan_function) (void); + +/* prepare for parallel index scan */ +typedef void (*aminitparallelscan_function) (void *target); + +/* (re)start parallel index scan */ +typedef void (*amparallelrescan_function) (IndexScanDesc scan); /* * API struct for an index AM. Note this must be stored in a single palloc'd @@ -196,6 +208,11 @@ typedef struct IndexAmRoutine amendscan_function amendscan; ammarkpos_function ammarkpos; /* can be NULL */ amrestrpos_function amrestrpos; /* can be NULL */ + + /* interface functions to support parallel index scans */ + amestimateparallelscan_function amestimateparallelscan; /* can be NULL */ + aminitparallelscan_function aminitparallelscan; /* can be NULL */ + amparallelrescan_function amparallelrescan; /* can be NULL */ } IndexAmRoutine; -- cgit v1.2.3