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

Commit9fa8b0e

Browse files
committed
Move pg_upgrade from contrib/ to src/bin/
Reviewed-by: Michael Paquier <michael.paquier@gmail.com>
1 parent30982be commit9fa8b0e

32 files changed

+78
-82
lines changed

‎contrib/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ SUBDIRS = \
3636
pg_test_fsync\
3737
pg_test_timing\
3838
pg_trgm\
39-
pg_upgrade\
4039
pgcrypto\
4140
pgrowlocks\
4241
pgstattuple\

‎contrib/pg_upgrade/Makefile

Lines changed: 0 additions & 34 deletions
This file was deleted.

‎doc/src/sgml/contrib.sgml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,6 @@ pages.
204204
&pgstandby;
205205
&pgtestfsync;
206206
&pgtesttiming;
207-
&pgupgrade;
208207
&pgxlogdump;
209208
</sect1>
210209
</appendix>

‎doc/src/sgml/filelist.sgml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,6 @@
136136
<!ENTITY pgtestfsync SYSTEM "pgtestfsync.sgml">
137137
<!ENTITY pgtesttiming SYSTEM "pgtesttiming.sgml">
138138
<!ENTITY pgtrgm SYSTEM "pgtrgm.sgml">
139-
<!ENTITY pgupgrade SYSTEM "pgupgrade.sgml">
140139
<!ENTITY pgxlogdump SYSTEM "pg_xlogdump.sgml">
141140
<!ENTITY postgres-fdw SYSTEM "postgres-fdw.sgml">
142141
<!ENTITY seg SYSTEM "seg.sgml">

‎doc/src/sgml/ref/allfiles.sgml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ Complete list of usable sgml source files in this directory.
193193
<!ENTITY pgResetxlog SYSTEM "pg_resetxlog.sgml">
194194
<!ENTITY pgRestore SYSTEM "pg_restore.sgml">
195195
<!ENTITY pgRewind SYSTEM "pg_rewind.sgml">
196+
<!ENTITY pgupgrade SYSTEM "pgupgrade.sgml">
196197
<!ENTITY postgres SYSTEM "postgres-ref.sgml">
197198
<!ENTITY postmaster SYSTEM "postmaster.sgml">
198199
<!ENTITY psqlRef SYSTEM "psql-ref.sgml">

‎doc/src/sgml/pgupgrade.sgmlrenamed to‎doc/src/sgml/ref/pgupgrade.sgml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- doc/src/sgml/pgupgrade.sgml -->
1+
<!-- doc/src/sgml/ref/pgupgrade.sgml -->
22

33
<refentry id="pgupgrade">
44
<indexterm zone="pgupgrade">
@@ -240,7 +240,8 @@ mv /usr/local/pgsql /usr/local/pgsql.old
240240
<title>Install the new PostgreSQL binaries</title>
241241

242242
<para>
243-
Install the new server's binaries and support files.
243+
Install the new server's binaries and support
244+
files. <application>pg_upgrade</> is included in a default installation.
244245
</para>
245246

246247
<para>
@@ -252,15 +253,6 @@ make prefix=/usr/local/pgsql.new install
252253
</programlisting></para>
253254
</step>
254255

255-
<step>
256-
<title>Install pg_upgrade</title>
257-
258-
<para>
259-
Install the <application>pg_upgrade</> binary in the new PostgreSQL
260-
installation.
261-
</para>
262-
</step>
263-
264256
<step>
265257
<title>Initialize the new PostgreSQL cluster</title>
266258

‎doc/src/sgml/reference.sgml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@
263263
&pgCtl;
264264
&pgResetxlog;
265265
&pgRewind;
266+
&pgupgrade;
266267
&postgres;
267268
&postmaster;
268269

‎src/bin/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ SUBDIRS = \
2323
pg_dump\
2424
pg_resetxlog\
2525
pg_rewind\
26+
pg_upgrade\
2627
pgbench\
2728
psql\
2829
scripts
File renamed without changes.

‎contrib/pg_upgrade/IMPLEMENTATIONrenamed to‎src/bin/pg_upgrade/IMPLEMENTATION

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
contrib/pg_upgrade/IMPLEMENTATION
2-
31
------------------------------------------------------------------------------
42
PG_UPGRADE: IN-PLACE UPGRADES FOR POSTGRESQL
53
------------------------------------------------------------------------------

‎src/bin/pg_upgrade/Makefile

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# src/bin/pg_upgrade/Makefile
2+
3+
PGFILEDESC = "pg_upgrade - an in-place binary upgrade utility"
4+
PGAPPICON = win32
5+
6+
subdir = src/bin/pg_upgrade
7+
top_builddir = ../../..
8+
include$(top_builddir)/src/Makefile.global
9+
10+
OBJS = check.o controldata.o dump.o exec.o file.o function.o info.o\
11+
option.o page.o parallel.o pg_upgrade.o relfilenode.o server.o\
12+
tablespace.o util.o version.o$(WIN32RES)
13+
14+
overrideCPPFLAGS := -DFRONTEND -DDLSUFFIX=\"$(DLSUFFIX)\" -I$(srcdir) -I$(libpq_srcdir)$(CPPFLAGS)
15+
16+
17+
all: pg_upgrade
18+
19+
pg_upgrade:$(OBJS) | submake-libpq submake-libpgport
20+
$(CC)$(CFLAGS)$^$(libpq_pgport)$(LDFLAGS)$(LDFLAGS_EX)$(LIBS) -o$@$(X)
21+
22+
install: all installdirs
23+
$(INSTALL_PROGRAM) pg_upgrade$(X)'$(DESTDIR)$(bindir)/pg_upgrade$(X)'
24+
25+
installdirs:
26+
$(MKDIR_P)'$(DESTDIR)$(bindir)'
27+
28+
uninstall:
29+
rm -f'$(DESTDIR)$(bindir)/pg_upgrade$(X)'
30+
31+
cleandistcleanmaintainer-clean:
32+
rm -f pg_upgrade$(X)$(OBJS)
33+
rm -rf analyze_new_cluster.sh delete_old_cluster.sh log/ tmp_check/\
34+
pg_upgrade_dump_globals.sql\
35+
pg_upgrade_dump_*.custom pg_upgrade_*.log
36+
37+
check: test.sh all
38+
MAKE=$(MAKE) bindir=$(bindir) libdir=$(libdir) EXTRA_REGRESS_OPTS="$(EXTRA_REGRESS_OPTS)"$(SHELL)$< --install
39+
40+
# disabled because it upsets the build farm
41+
#installcheck: test.sh
42+
#MAKE=$(MAKE) bindir=$(bindir) libdir=$(libdir) $(SHELL) $<

‎contrib/pg_upgrade/TESTINGrenamed to‎src/bin/pg_upgrade/TESTING

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
contrib/pg_upgrade/TESTING
2-
31
The most effective way to test pg_upgrade, aside from testing on user
42
data, is by upgrading the PostgreSQL regression database.
53

‎contrib/pg_upgrade/check.crenamed to‎src/bin/pg_upgrade/check.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*server checks and output routines
55
*
66
*Copyright (c) 2010-2015, PostgreSQL Global Development Group
7-
*contrib/pg_upgrade/check.c
7+
*src/bin/pg_upgrade/check.c
88
*/
99

1010
#include"postgres_fe.h"

‎contrib/pg_upgrade/controldata.crenamed to‎src/bin/pg_upgrade/controldata.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*controldata functions
55
*
66
*Copyright (c) 2010-2015, PostgreSQL Global Development Group
7-
*contrib/pg_upgrade/controldata.c
7+
*src/bin/pg_upgrade/controldata.c
88
*/
99

1010
#include"postgres_fe.h"

‎contrib/pg_upgrade/dump.crenamed to‎src/bin/pg_upgrade/dump.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*dump functions
55
*
66
*Copyright (c) 2010-2015, PostgreSQL Global Development Group
7-
*contrib/pg_upgrade/dump.c
7+
*src/bin/pg_upgrade/dump.c
88
*/
99

1010
#include"postgres_fe.h"

‎contrib/pg_upgrade/exec.crenamed to‎src/bin/pg_upgrade/exec.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*execution functions
55
*
66
*Copyright (c) 2010-2015, PostgreSQL Global Development Group
7-
*contrib/pg_upgrade/exec.c
7+
*src/bin/pg_upgrade/exec.c
88
*/
99

1010
#include"postgres_fe.h"

‎contrib/pg_upgrade/file.crenamed to‎src/bin/pg_upgrade/file.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*file system operations
55
*
66
*Copyright (c) 2010-2015, PostgreSQL Global Development Group
7-
*contrib/pg_upgrade/file.c
7+
*src/bin/pg_upgrade/file.c
88
*/
99

1010
#include"postgres_fe.h"

‎contrib/pg_upgrade/function.crenamed to‎src/bin/pg_upgrade/function.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*server-side function support
55
*
66
*Copyright (c) 2010-2015, PostgreSQL Global Development Group
7-
*contrib/pg_upgrade/function.c
7+
*src/bin/pg_upgrade/function.c
88
*/
99

1010
#include"postgres_fe.h"

‎contrib/pg_upgrade/info.crenamed to‎src/bin/pg_upgrade/info.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*information support functions
55
*
66
*Copyright (c) 2010-2015, PostgreSQL Global Development Group
7-
*contrib/pg_upgrade/info.c
7+
*src/bin/pg_upgrade/info.c
88
*/
99

1010
#include"postgres_fe.h"

‎contrib/pg_upgrade/option.crenamed to‎src/bin/pg_upgrade/option.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*options functions
55
*
66
*Copyright (c) 2010-2015, PostgreSQL Global Development Group
7-
*contrib/pg_upgrade/option.c
7+
*src/bin/pg_upgrade/option.c
88
*/
99

1010
#include"postgres_fe.h"

‎contrib/pg_upgrade/page.crenamed to‎src/bin/pg_upgrade/page.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*per-page conversion operations
55
*
66
*Copyright (c) 2010-2015, PostgreSQL Global Development Group
7-
*contrib/pg_upgrade/page.c
7+
*src/bin/pg_upgrade/page.c
88
*/
99

1010
#include"postgres_fe.h"

‎contrib/pg_upgrade/parallel.crenamed to‎src/bin/pg_upgrade/parallel.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*multi-process support
55
*
66
*Copyright (c) 2010-2015, PostgreSQL Global Development Group
7-
*contrib/pg_upgrade/parallel.c
7+
*src/bin/pg_upgrade/parallel.c
88
*/
99

1010
#include"postgres_fe.h"

‎contrib/pg_upgrade/pg_upgrade.crenamed to‎src/bin/pg_upgrade/pg_upgrade.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*main source file
55
*
66
*Copyright (c) 2010-2015, PostgreSQL Global Development Group
7-
*contrib/pg_upgrade/pg_upgrade.c
7+
*src/bin/pg_upgrade/pg_upgrade.c
88
*/
99

1010
/*

‎contrib/pg_upgrade/pg_upgrade.hrenamed to‎src/bin/pg_upgrade/pg_upgrade.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
*pg_upgrade.h
33
*
44
*Copyright (c) 2010-2015, PostgreSQL Global Development Group
5-
*contrib/pg_upgrade/pg_upgrade.h
5+
*src/bin/pg_upgrade/pg_upgrade.h
66
*/
77

88
#include<unistd.h>

‎contrib/pg_upgrade/relfilenode.crenamed to‎src/bin/pg_upgrade/relfilenode.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*relfilenode functions
55
*
66
*Copyright (c) 2010-2015, PostgreSQL Global Development Group
7-
*contrib/pg_upgrade/relfilenode.c
7+
*src/bin/pg_upgrade/relfilenode.c
88
*/
99

1010
#include"postgres_fe.h"

‎contrib/pg_upgrade/server.crenamed to‎src/bin/pg_upgrade/server.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*database server functions
55
*
66
*Copyright (c) 2010-2015, PostgreSQL Global Development Group
7-
*contrib/pg_upgrade/server.c
7+
*src/bin/pg_upgrade/server.c
88
*/
99

1010
#include"postgres_fe.h"

‎contrib/pg_upgrade/tablespace.crenamed to‎src/bin/pg_upgrade/tablespace.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*tablespace functions
55
*
66
*Copyright (c) 2010-2015, PostgreSQL Global Development Group
7-
*contrib/pg_upgrade/tablespace.c
7+
*src/bin/pg_upgrade/tablespace.c
88
*/
99

1010
#include"postgres_fe.h"

‎contrib/pg_upgrade/test.shrenamed to‎src/bin/pg_upgrade/test.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/sh
22

3-
#contrib/pg_upgrade/test.sh
3+
#src/bin/pg_upgrade/test.sh
44
#
55
# Test driver for pg_upgrade. Initializes a new database cluster,
66
# runs the regression tests (to put in some data), runs pg_dumpall,
@@ -21,7 +21,7 @@ unset MAKELEVEL
2121
# authentication configuration.
2222
standard_initdb() {
2323
"$1" -N
24-
../../src/test/regress/pg_regress --config-auth"$PGDATA"
24+
../../test/regress/pg_regress --config-auth"$PGDATA"
2525
}
2626

2727
# Establish how the server will listen for connections
@@ -92,9 +92,9 @@ fi
9292

9393
:${oldbindir=$bindir}
9494

95-
:${oldsrc=../..}
95+
:${oldsrc=../../..}
9696
oldsrc=`cd"$oldsrc"&& pwd`
97-
newsrc=`cd ../..&& pwd`
97+
newsrc=`cd ../../..&& pwd`
9898

9999
PATH=$bindir:$PATH
100100
export PATH

‎contrib/pg_upgrade/util.crenamed to‎src/bin/pg_upgrade/util.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*utility functions
55
*
66
*Copyright (c) 2010-2015, PostgreSQL Global Development Group
7-
*contrib/pg_upgrade/util.c
7+
*src/bin/pg_upgrade/util.c
88
*/
99

1010
#include"postgres_fe.h"

‎contrib/pg_upgrade/version.crenamed to‎src/bin/pg_upgrade/version.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*Postgres-version-specific routines
55
*
66
*Copyright (c) 2010-2015, PostgreSQL Global Development Group
7-
*contrib/pg_upgrade/version.c
7+
*src/bin/pg_upgrade/version.c
88
*/
99

1010
#include"postgres_fe.h"

‎src/tools/msvc/Mkvcbuild.pm

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,18 @@ my $libpq;
3131
# Set of variables for contrib modules
3232
my$contrib_defines = {'refint'=>'REFINT_VERBOSE' };
3333
my@contrib_uselibpq =
34-
('dblink','oid2name','pg_upgrade','postgres_fdw','vacuumlo');
34+
('dblink','oid2name','postgres_fdw','vacuumlo');
3535
my@contrib_uselibpgport = (
3636
'oid2name',
3737
'pg_standby',
3838
'pg_test_fsync','pg_test_timing',
39-
'pg_upgrade','pg_xlogdump',
39+
'pg_xlogdump',
4040
'vacuumlo');
4141
my@contrib_uselibpgcommon = (
4242
'oid2name',
4343
'pg_standby',
4444
'pg_test_fsync','pg_test_timing',
45-
'pg_upgrade','pg_xlogdump',
45+
'pg_xlogdump',
4646
'vacuumlo');
4747
my$contrib_extralibs =undef;
4848
my$contrib_extraincludes =
@@ -54,9 +54,9 @@ my @contrib_excludes = ('pgcrypto', 'intagg', 'sepgsql');
5454

5555
# Set of variables for frontend modules
5656
my$frontend_defines = {'initdb'=>'FRONTEND' };
57-
my@frontend_uselibpq = ('pg_ctl','pgbench','psql');
58-
my@frontend_uselibpgport = ('pg_archivecleanup','pgbench' );
59-
my@frontend_uselibpgcommon = ('pg_archivecleanup','pgbench' );
57+
my@frontend_uselibpq = ('pg_ctl','pg_upgrade','pgbench','psql');
58+
my@frontend_uselibpgport = ('pg_archivecleanup','pg_upgrade','pgbench' );
59+
my@frontend_uselibpgcommon = ('pg_archivecleanup','pg_upgrade','pgbench' );
6060
my$frontend_extralibs = {
6161
'initdb'=> ['ws2_32.lib'],
6262
'pg_restore'=> ['ws2_32.lib'],

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp