aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/backend/access/common/Makefile1
-rw-r--r--src/backend/access/common/syncscan.c (renamed from src/backend/access/heap/syncscan.c)6
-rw-r--r--src/backend/access/heap/Makefile1
-rw-r--r--src/backend/access/heap/heapam.c1
-rw-r--r--src/backend/access/heap/heapam_handler.c1
-rw-r--r--src/backend/access/table/tableam.c2
-rw-r--r--src/backend/storage/ipc/ipci.c1
-rw-r--r--src/include/access/heapam.h6
-rw-r--r--src/include/access/syncscan.h25
9 files changed, 33 insertions, 11 deletions
diff --git a/src/backend/access/common/Makefile b/src/backend/access/common/Makefile
index fd74e14024c..5a007d63f1a 100644
--- a/src/backend/access/common/Makefile
+++ b/src/backend/access/common/Makefile
@@ -24,6 +24,7 @@ OBJS = \
reloptions.o \
scankey.o \
session.o \
+ syncscan.o \
toast_internals.o \
tupconvert.o \
tupdesc.o
diff --git a/src/backend/access/heap/syncscan.c b/src/backend/access/common/syncscan.c
index a32f6836f80..c1ce156902b 100644
--- a/src/backend/access/heap/syncscan.c
+++ b/src/backend/access/common/syncscan.c
@@ -1,7 +1,7 @@
/*-------------------------------------------------------------------------
*
* syncscan.c
- * heap scan synchronization support
+ * scan synchronization support
*
* When multiple backends run a sequential scan on the same table, we try
* to keep them synchronized to reduce the overall I/O needed. The goal is
@@ -40,13 +40,13 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * src/backend/access/heap/syncscan.c
+ * src/backend/access/common/syncscan.c
*
*-------------------------------------------------------------------------
*/
#include "postgres.h"
-#include "access/heapam.h"
+#include "access/syncscan.h"
#include "miscadmin.h"
#include "storage/lwlock.h"
#include "storage/shmem.h"
diff --git a/src/backend/access/heap/Makefile b/src/backend/access/heap/Makefile
index 51a7f5e0d01..af0bd1888e5 100644
--- a/src/backend/access/heap/Makefile
+++ b/src/backend/access/heap/Makefile
@@ -20,7 +20,6 @@ OBJS = \
hio.o \
pruneheap.o \
rewriteheap.o \
- syncscan.o \
vacuumlazy.o \
visibilitymap.o
diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c
index 2c9bb0c7ee2..8df2716de46 100644
--- a/src/backend/access/heap/heapam.c
+++ b/src/backend/access/heap/heapam.c
@@ -41,6 +41,7 @@
#include "access/parallel.h"
#include "access/relscan.h"
#include "access/subtrans.h"
+#include "access/syncscan.h"
#include "access/sysattr.h"
#include "access/tableam.h"
#include "access/transam.h"
diff --git a/src/backend/access/heap/heapam_handler.c b/src/backend/access/heap/heapam_handler.c
index 8f2e5379210..267a6ee25a7 100644
--- a/src/backend/access/heap/heapam_handler.c
+++ b/src/backend/access/heap/heapam_handler.c
@@ -24,6 +24,7 @@
#include "access/heaptoast.h"
#include "access/multixact.h"
#include "access/rewriteheap.h"
+#include "access/syncscan.h"
#include "access/tableam.h"
#include "access/tsmapi.h"
#include "access/xact.h"
diff --git a/src/backend/access/table/tableam.c b/src/backend/access/table/tableam.c
index 4e8553de2af..3afb63b1fe4 100644
--- a/src/backend/access/table/tableam.c
+++ b/src/backend/access/table/tableam.c
@@ -21,7 +21,7 @@
#include <math.h>
-#include "access/heapam.h" /* for ss_* */
+#include "access/syncscan.h"
#include "access/tableam.h"
#include "access/xact.h"
#include "optimizer/plancat.h"
diff --git a/src/backend/storage/ipc/ipci.c b/src/backend/storage/ipc/ipci.c
index 427b0d59cde..e850ebd131e 100644
--- a/src/backend/storage/ipc/ipci.c
+++ b/src/backend/storage/ipc/ipci.c
@@ -20,6 +20,7 @@
#include "access/multixact.h"
#include "access/nbtree.h"
#include "access/subtrans.h"
+#include "access/syncscan.h"
#include "access/twophase.h"
#include "commands/async.h"
#include "miscadmin.h"
diff --git a/src/include/access/heapam.h b/src/include/access/heapam.h
index f279edc4734..b31de389106 100644
--- a/src/include/access/heapam.h
+++ b/src/include/access/heapam.h
@@ -182,12 +182,6 @@ extern void heap_page_prune_execute(Buffer buffer,
OffsetNumber *nowunused, int nunused);
extern void heap_get_root_tuples(Page page, OffsetNumber *root_offsets);
-/* in heap/syncscan.c */
-extern void ss_report_location(Relation rel, BlockNumber location);
-extern BlockNumber ss_get_location(Relation rel, BlockNumber relnblocks);
-extern void SyncScanShmemInit(void);
-extern Size SyncScanShmemSize(void);
-
/* in heap/vacuumlazy.c */
struct VacuumParams;
extern void heap_vacuum_rel(Relation onerel,
diff --git a/src/include/access/syncscan.h b/src/include/access/syncscan.h
new file mode 100644
index 00000000000..7cbf63c399f
--- /dev/null
+++ b/src/include/access/syncscan.h
@@ -0,0 +1,25 @@
+/*-------------------------------------------------------------------------
+ *
+ * syncscan.h
+ * POSTGRES synchronous scan support functions.
+ *
+ *
+ * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
+ *
+ * src/include/access/syncscan.h
+ *
+ *-------------------------------------------------------------------------
+ */
+#ifndef SYNCSCAN_H
+#define SYNCSCAN_H
+
+#include "storage/block.h"
+#include "utils/relcache.h"
+
+extern void ss_report_location(Relation rel, BlockNumber location);
+extern BlockNumber ss_get_location(Relation rel, BlockNumber relnblocks);
+extern void SyncScanShmemInit(void);
+extern Size SyncScanShmemSize(void);
+
+#endif