From ada1d927644355e4813ed050449a985c69a9989c Mon Sep 17 00:00:00 2001 From: Masahiko Sawada Date: Fri, 10 Aug 2018 14:37:40 +0900 Subject: [PATCH v8 1/3] Publish some parallel heap scan functions. --- src/backend/access/heap/heapam.c | 6 ++---- src/include/access/heapam.h | 2 ++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c index fb63471..e599294 100644 --- a/src/backend/access/heap/heapam.c +++ b/src/backend/access/heap/heapam.c @@ -93,8 +93,6 @@ static HeapScanDesc heap_beginscan_internal(Relation relation, bool is_bitmapscan, bool is_samplescan, bool temp_snap); -static void heap_parallelscan_startblock_init(HeapScanDesc scan); -static BlockNumber heap_parallelscan_nextpage(HeapScanDesc scan); static HeapTuple heap_prepare_insert(Relation relation, HeapTuple tup, TransactionId xid, CommandId cid, int options); static XLogRecPtr log_heap_update(Relation reln, Buffer oldbuf, @@ -1706,7 +1704,7 @@ heap_beginscan_parallel(Relation relation, ParallelHeapScanDesc parallel_scan) * only to set the startblock once. * ---------------- */ -static void +void heap_parallelscan_startblock_init(HeapScanDesc scan) { BlockNumber sync_startpage = InvalidBlockNumber; @@ -1754,7 +1752,7 @@ retry: * first backend gets an InvalidBlockNumber return. * ---------------- */ -static BlockNumber +BlockNumber heap_parallelscan_nextpage(HeapScanDesc scan) { BlockNumber page; diff --git a/src/include/access/heapam.h b/src/include/access/heapam.h index 40e153f..c7204fc 100644 --- a/src/include/access/heapam.h +++ b/src/include/access/heapam.h @@ -127,6 +127,8 @@ extern void heap_rescan_set_params(HeapScanDesc scan, ScanKey key, bool allow_strat, bool allow_sync, bool allow_pagemode); extern void heap_endscan(HeapScanDesc scan); extern HeapTuple heap_getnext(HeapScanDesc scan, ScanDirection direction); +extern BlockNumber heap_parallelscan_nextpage(HeapScanDesc scan); +extern void heap_parallelscan_startblock_init(HeapScanDesc scan); extern Size heap_parallelscan_estimate(Snapshot snapshot); extern void heap_parallelscan_initialize(ParallelHeapScanDesc target, -- 2.10.5