Move frontend-side archive APIs from src/common/ to src/fe_utils/
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
This commit is contained in:
parent
d6d3f8bc84
commit
8d8b89266c
@ -19,7 +19,7 @@
|
||||
#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"
|
||||
|
||||
|
@ -89,7 +89,6 @@ endif
|
||||
# (Mkvcbuild.pm has a copy of this list, too)
|
||||
OBJS_FRONTEND = \
|
||||
$(OBJS_COMMON) \
|
||||
fe_archive.o \
|
||||
fe_memutils.o \
|
||||
file_utils.o \
|
||||
logging.o \
|
||||
|
@ -20,6 +20,7 @@ include $(top_builddir)/src/Makefile.global
|
||||
override CPPFLAGS := -DFRONTEND -I$(libpq_srcdir) $(CPPFLAGS)
|
||||
|
||||
OBJS = \
|
||||
archive.o \
|
||||
cancel.o \
|
||||
conditional.o \
|
||||
mbprint.o \
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*-------------------------------------------------------------------------
|
||||
*
|
||||
* fe_archive.c
|
||||
* archive.c
|
||||
* Routines to access WAL archives from frontend
|
||||
*
|
||||
* Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group
|
||||
@ -8,15 +8,11 @@
|
||||
*
|
||||
*
|
||||
* 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>
|
||||
@ -24,8 +20,8 @@
|
||||
|
||||
#include "access/xlog_internal.h"
|
||||
#include "common/archive.h"
|
||||
#include "common/fe_archive.h"
|
||||
#include "common/logging.h"
|
||||
#include "fe_utils/archive.h"
|
||||
|
||||
|
||||
/*
|
@ -1,12 +1,12 @@
|
||||
/*-------------------------------------------------------------------------
|
||||
*
|
||||
* 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
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
@ -138,14 +138,14 @@ sub mkvcbuild
|
||||
}
|
||||
|
||||
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');
|
||||
|
Loading…
x
Reference in New Issue
Block a user