diff options
author | Robert Haas <rhaas@postgresql.org> | 2017-01-24 16:42:58 -0500 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2017-01-24 16:42:58 -0500 |
commit | 7b4ac19982a77a1a2a6f096c4a11ee7325a14d2c (patch) | |
tree | ac2192af5b3aa1c9898c67c304f9ab239f044a1d /src/include/access/amapi.h | |
parent | 587cda35ca331128db6c61d406d312654572834a (diff) | |
download | postgresql-7b4ac19982a77a1a2a6f096c4a11ee7325a14d2c.tar.gz postgresql-7b4ac19982a77a1a2a6f096c4a11ee7325a14d2c.zip |
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
Diffstat (limited to 'src/include/access/amapi.h')
-rw-r--r-- | src/include/access/amapi.h | 17 |
1 files changed, 17 insertions, 0 deletions
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; |