Skip to content

Commit a3b2bf1

Browse files
committed
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
1 parent c4325ce commit a3b2bf1

File tree

6 files changed

+11
-15
lines changed

6 files changed

+11
-15
lines changed

src/bin/pg_rewind/parsexlog.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#include "catalog/pg_control.h"
2020
#include "catalog/storage_xlog.h"
2121
#include "commands/dbcommands_xlog.h"
22-
#include "common/fe_archive.h"
22+
#include "fe_utils/archive.h"
2323
#include "filemap.h"
2424
#include "pg_rewind.h"
2525

src/common/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ endif
8989
# (Mkvcbuild.pm has a copy of this list, too)
9090
OBJS_FRONTEND = \
9191
$(OBJS_COMMON) \
92-
fe_archive.o \
9392
fe_memutils.o \
9493
file_utils.o \
9594
logging.o \

src/fe_utils/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ include $(top_builddir)/src/Makefile.global
2020
override CPPFLAGS := -DFRONTEND -I$(libpq_srcdir) $(CPPFLAGS)
2121

2222
OBJS = \
23+
archive.o \
2324
cancel.o \
2425
conditional.o \
2526
mbprint.o \

src/common/fe_archive.c renamed to src/fe_utils/archive.c

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,27 @@
11
/*-------------------------------------------------------------------------
22
*
3-
* fe_archive.c
3+
* archive.c
44
* Routines to access WAL archives from frontend
55
*
66
* Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
99
*
1010
* IDENTIFICATION
11-
* src/common/fe_archive.c
11+
* src/fe_utils/archive.c
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
1515

16-
#ifndef FRONTEND
17-
#error "This file is not expected to be compiled for backend code"
18-
#endif
19-
2016
#include "postgres_fe.h"
2117

2218
#include <unistd.h>
2319
#include <sys/stat.h>
2420

2521
#include "access/xlog_internal.h"
2622
#include "common/archive.h"
27-
#include "common/fe_archive.h"
2823
#include "common/logging.h"
24+
#include "fe_utils/archive.h"
2925

3026

3127
/*

src/include/common/fe_archive.h renamed to src/include/fe_utils/archive.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
/*-------------------------------------------------------------------------
22
*
3-
* fe_archive.h
3+
* archive.h
44
* Routines to access WAL archives from frontend
55
*
66
* Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
9-
* src/include/common/fe_archive.h
9+
* src/include/fe_utils/archive.h
1010
*
1111
*-------------------------------------------------------------------------
1212
*/

src/tools/msvc/Mkvcbuild.pm

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,14 +138,14 @@ sub mkvcbuild
138138
}
139139

140140
our @pgcommonfrontendfiles = (
141-
@pgcommonallfiles, qw(fe_archive.c fe_memutils.c
142-
file_utils.c logging.c restricted_token.c));
141+
@pgcommonallfiles, qw(fe_memutils.c file_utils.c
142+
logging.c restricted_token.c));
143143

144144
our @pgcommonbkndfiles = @pgcommonallfiles;
145145

146146
our @pgfeutilsfiles = qw(
147-
cancel.c conditional.c mbprint.c print.c psqlscan.l psqlscan.c
148-
simple_list.c string_utils.c recovery_gen.c);
147+
archive.c cancel.c conditional.c mbprint.c print.c psqlscan.l
148+
psqlscan.c simple_list.c string_utils.c recovery_gen.c);
149149

150150
$libpgport = $solution->AddProject('libpgport', 'lib', 'misc');
151151
$libpgport->AddDefine('FRONTEND');

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy