Skip to content

Commit 83aca89

Browse files
committed
Move pg_archivecleanup from contrib/ to src/bin/
Reviewed-by: Michael Paquier <michael.paquier@gmail.com>
1 parent 27846f0 commit 83aca89

File tree

12 files changed

+39
-35
lines changed

12 files changed

+39
-35
lines changed

contrib/Makefile

-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ SUBDIRS = \
2828
oid2name \
2929
pageinspect \
3030
passwordcheck \
31-
pg_archivecleanup \
3231
pg_buffercache \
3332
pg_freespacemap \
3433
pg_prewarm \

contrib/pg_archivecleanup/Makefile

-18
This file was deleted.

doc/src/sgml/contrib.sgml

-1
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,6 @@ pages.
202202
part of the core <productname>PostgreSQL</productname> distribution.
203203
</para>
204204

205-
&pgarchivecleanup;
206205
&pgstandby;
207206
&pgtestfsync;
208207
&pgtesttiming;

doc/src/sgml/filelist.sgml

-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@
126126
<!ENTITY pageinspect SYSTEM "pageinspect.sgml">
127127
<!ENTITY passwordcheck SYSTEM "passwordcheck.sgml">
128128
<!ENTITY pgbench SYSTEM "pgbench.sgml">
129-
<!ENTITY pgarchivecleanup SYSTEM "pgarchivecleanup.sgml">
130129
<!ENTITY pgbuffercache SYSTEM "pgbuffercache.sgml">
131130
<!ENTITY pgcrypto SYSTEM "pgcrypto.sgml">
132131
<!ENTITY pgfreespacemap SYSTEM "pgfreespacemap.sgml">

doc/src/sgml/ref/allfiles.sgml

+1
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ Complete list of usable sgml source files in this directory.
179179
<!ENTITY dropuser SYSTEM "dropuser.sgml">
180180
<!ENTITY ecpgRef SYSTEM "ecpg-ref.sgml">
181181
<!ENTITY initdb SYSTEM "initdb.sgml">
182+
<!ENTITY pgarchivecleanup SYSTEM "pgarchivecleanup.sgml">
182183
<!ENTITY pgBasebackup SYSTEM "pg_basebackup.sgml">
183184
<!ENTITY pgConfig SYSTEM "pg_config-ref.sgml">
184185
<!ENTITY pgControldata SYSTEM "pg_controldata.sgml">

doc/src/sgml/pgarchivecleanup.sgml renamed to doc/src/sgml/ref/pgarchivecleanup.sgml

+1-9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- doc/src/sgml/pgarchivecleanup.sgml -->
1+
<!-- doc/src/sgml/ref/pgarchivecleanup.sgml -->
22

33
<refentry id="pgarchivecleanup">
44
<indexterm zone="pgarchivecleanup">
@@ -193,14 +193,6 @@ archive_cleanup_command = 'pg_archivecleanup -d /mnt/standby/archive %r 2>>clean
193193
</itemizedlist>
194194
</refsect1>
195195

196-
<refsect1>
197-
<title>Author</title>
198-
199-
<para>
200-
Simon Riggs <email>simon@2ndquadrant.com</email>
201-
</para>
202-
</refsect1>
203-
204196
<refsect1>
205197
<title>See Also</title>
206198

doc/src/sgml/reference.sgml

+1
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@
257257
</partintro>
258258

259259
&initdb;
260+
&pgarchivecleanup;
260261
&pgControldata;
261262
&pgCtl;
262263
&pgResetxlog;

src/bin/Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ include $(top_builddir)/src/Makefile.global
1515

1616
SUBDIRS = \
1717
initdb \
18+
pg_archivecleanup \
1819
pg_basebackup \
1920
pg_config \
2021
pg_controldata \

src/bin/pg_archivecleanup/Makefile

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# src/bin/pg_archivecleanup/Makefile
2+
3+
PGFILEDESC = "pg_archivecleanup - cleans archive when used with streaming replication"
4+
PGAPPICON = win32
5+
6+
subdir = src/bin/pg_archivecleanup
7+
top_builddir = ../../..
8+
include $(top_builddir)/src/Makefile.global
9+
10+
OBJS = pg_archivecleanup.o $(WIN32RES)
11+
12+
all: pg_archivecleanup
13+
14+
pg_archivecleanup: $(OBJS) | submake-libpgport
15+
$(CC) $(CFLAGS) $^ $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
16+
17+
install: all installdirs
18+
$(INSTALL_PROGRAM) pg_archivecleanup$(X) '$(DESTDIR)$(bindir)/pg_archivecleanup$(X)'
19+
20+
installdirs:
21+
$(MKDIR_P) '$(DESTDIR)$(bindir)'
22+
23+
uninstall:
24+
rm -f '$(DESTDIR)$(bindir)/pg_archivecleanup$(X)'
25+
26+
clean distclean maintainer-clean:
27+
rm -f pg_archivecleanup$(X) $(OBJS)

contrib/pg_archivecleanup/pg_archivecleanup.c renamed to src/bin/pg_archivecleanup/pg_archivecleanup.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* contrib/pg_archivecleanup/pg_archivecleanup.c
2+
* src/bin/pg_archivecleanup/pg_archivecleanup.c
33
*
44
* pg_archivecleanup.c
55
*

src/tools/msvc/Mkvcbuild.pm

+7-4
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ my @contrib_uselibpq =
3434
('dblink', 'oid2name', 'pgbench', 'pg_upgrade', 'postgres_fdw', 'vacuumlo');
3535
my @contrib_uselibpgport = (
3636
'oid2name', 'pgbench',
37-
'pg_standby', 'pg_archivecleanup',
37+
'pg_standby',
3838
'pg_test_fsync', 'pg_test_timing',
3939
'pg_upgrade', 'pg_xlogdump',
4040
'vacuumlo');
4141
my @contrib_uselibpgcommon = (
4242
'oid2name', 'pgbench',
43-
'pg_standby', 'pg_archivecleanup',
43+
'pg_standby',
4444
'pg_test_fsync', 'pg_test_timing',
4545
'pg_upgrade', 'pg_xlogdump',
4646
'vacuumlo');
@@ -57,6 +57,8 @@ my @contrib_excludes = ('pgcrypto', 'intagg', 'sepgsql');
5757
# Set of variables for frontend modules
5858
my $frontend_defines = { 'initdb' => 'FRONTEND' };
5959
my @frontend_uselibpq = ('pg_ctl', 'psql');
60+
my @frontend_uselibpgport = ( 'pg_archivecleanup' );
61+
my @frontend_uselibpgcommon = ( 'pg_archivecleanup' );
6062
my $frontend_extralibs = {
6163
'initdb' => ['ws2_32.lib'],
6264
'pg_restore' => ['ws2_32.lib'],
@@ -769,8 +771,9 @@ sub AdjustContribProj
769771
sub AdjustFrontendProj
770772
{
771773
my $proj = shift;
772-
AdjustModule($proj, $frontend_defines, \@frontend_uselibpq, undef,
773-
undef, $frontend_extralibs,
774+
AdjustModule($proj, $frontend_defines, \@frontend_uselibpq,
775+
\@frontend_uselibpgport, \@frontend_uselibpgcommon,
776+
$frontend_extralibs,
774777
$frontend_extrasource, $frontend_extraincludes);
775778
}
776779

0 commit comments

Comments
 (0)