fe_archive.c was compiled only for the frontend in src/common/, but as
it will never share anything with the backend, it makes most sense to
move this file to src/fe_utils/.
Reported-by: Peter Eisentraut
Discussion: https://postgr.es/m/
e9766d71-8655-ac86-bdf6-
77e0e7169977@2ndquadrant.com
Backpatch-through: 13
#include "catalog/pg_control.h"
#include "catalog/storage_xlog.h"
#include "commands/dbcommands_xlog.h"
-#include "common/fe_archive.h"
+#include "fe_utils/archive.h"
#include "filemap.h"
#include "pg_rewind.h"
# (Mkvcbuild.pm has a copy of this list, too)
OBJS_FRONTEND = \
$(OBJS_COMMON) \
- fe_archive.o \
fe_memutils.o \
file_utils.o \
logging.o \
override CPPFLAGS := -DFRONTEND -I$(libpq_srcdir) $(CPPFLAGS)
OBJS = \
+ archive.o \
cancel.o \
conditional.o \
mbprint.o \
/*-------------------------------------------------------------------------
*
- * fe_archive.c
+ * archive.c
* Routines to access WAL archives from frontend
*
* Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group
*
*
* IDENTIFICATION
- * src/common/fe_archive.c
+ * src/fe_utils/archive.c
*
*-------------------------------------------------------------------------
*/
-#ifndef FRONTEND
-#error "This file is not expected to be compiled for backend code"
-#endif
-
#include "postgres_fe.h"
#include <unistd.h>
#include "access/xlog_internal.h"
#include "common/archive.h"
-#include "common/fe_archive.h"
#include "common/logging.h"
+#include "fe_utils/archive.h"
/*
/*-------------------------------------------------------------------------
*
- * fe_archive.h
+ * archive.h
* Routines to access WAL archives from frontend
*
* Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * src/include/common/fe_archive.h
+ * src/include/fe_utils/archive.h
*
*-------------------------------------------------------------------------
*/
}
our @pgcommonfrontendfiles = (
- @pgcommonallfiles, qw(fe_archive.c fe_memutils.c
- file_utils.c logging.c restricted_token.c));
+ @pgcommonallfiles, qw(fe_memutils.c file_utils.c
+ logging.c restricted_token.c));
our @pgcommonbkndfiles = @pgcommonallfiles;
our @pgfeutilsfiles = qw(
- cancel.c conditional.c mbprint.c print.c psqlscan.l psqlscan.c
- simple_list.c string_utils.c recovery_gen.c);
+ archive.c cancel.c conditional.c mbprint.c print.c psqlscan.l
+ psqlscan.c simple_list.c string_utils.c recovery_gen.c);
$libpgport = $solution->AddProject('libpgport', 'lib', 'misc');
$libpgport->AddDefine('FRONTEND');