summaryrefslogtreecommitdiff
path: root/src/backend/access
diff options
context:
space:
mode:
authorThomas Munro2020-07-29 04:46:58 +0000
committerThomas Munro2020-07-29 04:59:33 +0000
commitcb04ad498551dcdb91a834c2e8730cdf0b77e70a (patch)
tree2079a9e2825f8db93e8c86ce1415f004f4c773a5 /src/backend/access
parentc49c74d19241b1fc8da6c215ebb40fd6b71c1bff (diff)
Move syncscan.c to src/backend/access/common.
Since the tableam.c code needs to make use of the syncscan.c routines itself, and since other block-oriented AMs might also want to use it one day, it didn't make sense for it to live under src/backend/access/heap. Reviewed-by: Andres Freund <[email protected]> Discussion: https://postgr.es/m/CA%2BhUKGLCnG%3DNEAByg6bk%2BCT9JZD97Y%3DAxKhh27Su9FeGWOKvDg%40mail.gmail.com
Diffstat (limited to 'src/backend/access')
-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
6 files changed, 7 insertions, 5 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"