Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita3b2bf1

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 asit will never share anything with the backend, it makes most sense tomove this file to src/fe_utils/.Reported-by: Peter EisentrautDiscussion:https://postgr.es/m/e9766d71-8655-ac86-bdf6-77e0e7169977@2ndquadrant.comBackpatch-through: 13
1 parentc4325ce commita3b2bf1

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
overrideCPPFLAGS := -DFRONTEND -I$(libpq_srcdir)$(CPPFLAGS)
2121

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

‎src/common/fe_archive.crenamed 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-
#ifndefFRONTEND
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.hrenamed 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.cfe_memutils.c
142-
file_utils.clogging.c restricted_token.c));
141+
@pgcommonallfiles,qw(fe_memutils.cfile_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.ccancel.c conditional.c mbprint.c print.c psqlscan.l
148+
psqlscan.csimple_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)

[8]ページ先頭

©2009-2025 Movatter.jp