Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
9fa8b0ee
Commit
9fa8b0ee
authored
Mar 10, 2015
by
Peter Eisentraut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move pg_upgrade from contrib/ to src/bin/
Reviewed-by:
Michael Paquier
<
michael.paquier@gmail.com
>
parent
30982be4
Changes
31
Hide whitespace changes
Inline
Side-by-side
Showing
31 changed files
with
78 additions
and
48 deletions
+78
-48
contrib/Makefile
contrib/Makefile
+0
-1
doc/src/sgml/contrib.sgml
doc/src/sgml/contrib.sgml
+0
-1
doc/src/sgml/filelist.sgml
doc/src/sgml/filelist.sgml
+0
-1
doc/src/sgml/ref/allfiles.sgml
doc/src/sgml/ref/allfiles.sgml
+1
-0
doc/src/sgml/ref/pgupgrade.sgml
doc/src/sgml/ref/pgupgrade.sgml
+3
-11
doc/src/sgml/reference.sgml
doc/src/sgml/reference.sgml
+1
-0
src/bin/Makefile
src/bin/Makefile
+1
-0
src/bin/pg_upgrade/.gitignore
src/bin/pg_upgrade/.gitignore
+0
-0
src/bin/pg_upgrade/IMPLEMENTATION
src/bin/pg_upgrade/IMPLEMENTATION
+0
-2
src/bin/pg_upgrade/Makefile
src/bin/pg_upgrade/Makefile
+42
-0
src/bin/pg_upgrade/TESTING
src/bin/pg_upgrade/TESTING
+0
-2
src/bin/pg_upgrade/check.c
src/bin/pg_upgrade/check.c
+1
-1
src/bin/pg_upgrade/controldata.c
src/bin/pg_upgrade/controldata.c
+1
-1
src/bin/pg_upgrade/dump.c
src/bin/pg_upgrade/dump.c
+1
-1
src/bin/pg_upgrade/exec.c
src/bin/pg_upgrade/exec.c
+1
-1
src/bin/pg_upgrade/file.c
src/bin/pg_upgrade/file.c
+1
-1
src/bin/pg_upgrade/function.c
src/bin/pg_upgrade/function.c
+1
-1
src/bin/pg_upgrade/info.c
src/bin/pg_upgrade/info.c
+1
-1
src/bin/pg_upgrade/option.c
src/bin/pg_upgrade/option.c
+1
-1
src/bin/pg_upgrade/page.c
src/bin/pg_upgrade/page.c
+1
-1
src/bin/pg_upgrade/parallel.c
src/bin/pg_upgrade/parallel.c
+1
-1
src/bin/pg_upgrade/pg_upgrade.c
src/bin/pg_upgrade/pg_upgrade.c
+1
-1
src/bin/pg_upgrade/pg_upgrade.h
src/bin/pg_upgrade/pg_upgrade.h
+1
-1
src/bin/pg_upgrade/relfilenode.c
src/bin/pg_upgrade/relfilenode.c
+1
-1
src/bin/pg_upgrade/server.c
src/bin/pg_upgrade/server.c
+1
-1
src/bin/pg_upgrade/tablespace.c
src/bin/pg_upgrade/tablespace.c
+1
-1
src/bin/pg_upgrade/test.sh
src/bin/pg_upgrade/test.sh
+4
-4
src/bin/pg_upgrade/util.c
src/bin/pg_upgrade/util.c
+1
-1
src/bin/pg_upgrade/version.c
src/bin/pg_upgrade/version.c
+1
-1
src/tools/msvc/Mkvcbuild.pm
src/tools/msvc/Mkvcbuild.pm
+6
-6
src/tools/msvc/vcregress.pl
src/tools/msvc/vcregress.pl
+3
-3
No files found.
contrib/Makefile
View file @
9fa8b0ee
...
...
@@ -36,7 +36,6 @@ SUBDIRS = \
pg_test_fsync
\
pg_test_timing
\
pg_trgm
\
pg_upgrade
\
pgcrypto
\
pgrowlocks
\
pgstattuple
\
...
...
doc/src/sgml/contrib.sgml
View file @
9fa8b0ee
...
...
@@ -204,7 +204,6 @@ pages.
&pgstandby;
&pgtestfsync;
&pgtesttiming;
&pgupgrade;
&pgxlogdump;
</sect1>
</appendix>
doc/src/sgml/filelist.sgml
View file @
9fa8b0ee
...
...
@@ -136,7 +136,6 @@
<!ENTITY pgtestfsync SYSTEM "pgtestfsync.sgml">
<!ENTITY pgtesttiming SYSTEM "pgtesttiming.sgml">
<!ENTITY pgtrgm SYSTEM "pgtrgm.sgml">
<!ENTITY pgupgrade SYSTEM "pgupgrade.sgml">
<!ENTITY pgxlogdump SYSTEM "pg_xlogdump.sgml">
<!ENTITY postgres-fdw SYSTEM "postgres-fdw.sgml">
<!ENTITY seg SYSTEM "seg.sgml">
...
...
doc/src/sgml/ref/allfiles.sgml
View file @
9fa8b0ee
...
...
@@ -193,6 +193,7 @@ Complete list of usable sgml source files in this directory.
<!ENTITY pgResetxlog SYSTEM "pg_resetxlog.sgml">
<!ENTITY pgRestore SYSTEM "pg_restore.sgml">
<!ENTITY pgRewind SYSTEM "pg_rewind.sgml">
<!ENTITY pgupgrade SYSTEM "pgupgrade.sgml">
<!ENTITY postgres SYSTEM "postgres-ref.sgml">
<!ENTITY postmaster SYSTEM "postmaster.sgml">
<!ENTITY psqlRef SYSTEM "psql-ref.sgml">
...
...
doc/src/sgml/pgupgrade.sgml
→
doc/src/sgml/
ref/
pgupgrade.sgml
View file @
9fa8b0ee
<!-- doc/src/sgml/pgupgrade.sgml -->
<!-- doc/src/sgml/
ref/
pgupgrade.sgml -->
<refentry id="pgupgrade">
<indexterm zone="pgupgrade">
...
...
@@ -240,7 +240,8 @@ mv /usr/local/pgsql /usr/local/pgsql.old
<title>Install the new PostgreSQL binaries</title>
<para>
Install the new server's binaries and support files.
Install the new server's binaries and support
files. <application>pg_upgrade</> is included in a default installation.
</para>
<para>
...
...
@@ -252,15 +253,6 @@ make prefix=/usr/local/pgsql.new install
</programlisting></para>
</step>
<step>
<title>Install pg_upgrade</title>
<para>
Install the <application>pg_upgrade</> binary in the new PostgreSQL
installation.
</para>
</step>
<step>
<title>Initialize the new PostgreSQL cluster</title>
...
...
doc/src/sgml/reference.sgml
View file @
9fa8b0ee
...
...
@@ -263,6 +263,7 @@
&pgCtl;
&pgResetxlog;
&pgRewind;
&pgupgrade;
&postgres;
&postmaster;
...
...
src/bin/Makefile
View file @
9fa8b0ee
...
...
@@ -23,6 +23,7 @@ SUBDIRS = \
pg_dump
\
pg_resetxlog
\
pg_rewind
\
pg_upgrade
\
pgbench
\
psql
\
scripts
...
...
contrib
/pg_upgrade/.gitignore
→
src/bin
/pg_upgrade/.gitignore
View file @
9fa8b0ee
File moved
contrib
/pg_upgrade/IMPLEMENTATION
→
src/bin
/pg_upgrade/IMPLEMENTATION
View file @
9fa8b0ee
contrib/pg_upgrade/IMPLEMENTATION
------------------------------------------------------------------------------
PG_UPGRADE: IN-PLACE UPGRADES FOR POSTGRESQL
------------------------------------------------------------------------------
...
...
contrib
/pg_upgrade/Makefile
→
src/bin
/pg_upgrade/Makefile
View file @
9fa8b0ee
#
contrib
/pg_upgrade/Makefile
#
src/bin
/pg_upgrade/Makefile
PGFILEDESC
=
"pg_upgrade - an in-place binary upgrade utility"
PGAPPICON
=
win32
PROGRAM
=
pg_upgrade
subdir
=
src/bin/pg_upgrade
top_builddir
=
../../..
include
$(top_builddir)/src/Makefile.global
OBJS
=
check.o controldata.o dump.o exec.o file.o
function
.o info.o
\
option.o page.o parallel.o pg_upgrade.o relfilenode.o server.o
\
tablespace.o util.o version.o
$(WIN32RES)
PG_CPPFLAGS
=
-DFRONTEND
-DDLSUFFIX
=
\"
$(DLSUFFIX)
\"
-I
$(srcdir)
-I
$(libpq_srcdir)
PG_LIBS
=
$(libpq_pgport)
override CPPFLAGS
:
= -DFRONTEND -DDLSUFFIX=
\"
$(DLSUFFIX)
\"
-I$(srcdir) -I$(libpq_srcdir) $(CPPFLAGS)
EXTRA_CLEAN
=
analyze_new_cluster.sh delete_old_cluster.sh log/ tmp_check/
\
pg_upgrade_dump_globals.sql
\
pg_upgrade_dump_
*
.custom pg_upgrade_
*
.log
ifdef
USE_PGXS
PG_CONFIG
=
pg_config
PGXS
:=
$(
shell
$(PG_CONFIG)
--pgxs
)
include
$(PGXS)
else
subdir
=
contrib/pg_upgrade
top_builddir
=
../..
include
$(top_builddir)/src/Makefile.global
include
$(top_srcdir)/contrib/contrib-global.mk
endif
all
:
pg_upgrade
pg_upgrade
:
$(OBJS) | submake-libpq submake-libpgport
$(CC)
$(CFLAGS)
$^
$(libpq_pgport)
$(LDFLAGS)
$(LDFLAGS_EX)
$(LIBS)
-o
$@$(X)
install
:
all installdirs
$(INSTALL_PROGRAM)
pg_upgrade
$(X)
'
$(DESTDIR)$(bindir)
/pg_upgrade
$(X)
'
installdirs
:
$(MKDIR_P)
'
$(DESTDIR)$(bindir)
'
uninstall
:
rm
-f
'
$(DESTDIR)$(bindir)
/pg_upgrade
$(X)
'
clean distclean maintainer-clean
:
rm
-f
pg_upgrade
$(X)
$(OBJS)
rm
-rf
analyze_new_cluster.sh delete_old_cluster.sh log/ tmp_check/
\
pg_upgrade_dump_globals.sql
\
pg_upgrade_dump_
*
.custom pg_upgrade_
*
.log
check
:
test.sh all
MAKE
=
$(MAKE)
bindir
=
$(bindir)
libdir
=
$(libdir)
EXTRA_REGRESS_OPTS
=
"
$(EXTRA_REGRESS_OPTS)
"
$(SHELL)
$<
--install
...
...
contrib
/pg_upgrade/TESTING
→
src/bin
/pg_upgrade/TESTING
View file @
9fa8b0ee
contrib/pg_upgrade/TESTING
The most effective way to test pg_upgrade, aside from testing on user
data, is by upgrading the PostgreSQL regression database.
...
...
contrib
/pg_upgrade/check.c
→
src/bin
/pg_upgrade/check.c
View file @
9fa8b0ee
...
...
@@ -4,7 +4,7 @@
* server checks and output routines
*
* Copyright (c) 2010-2015, PostgreSQL Global Development Group
*
contrib
/pg_upgrade/check.c
*
src/bin
/pg_upgrade/check.c
*/
#include "postgres_fe.h"
...
...
contrib
/pg_upgrade/controldata.c
→
src/bin
/pg_upgrade/controldata.c
View file @
9fa8b0ee
...
...
@@ -4,7 +4,7 @@
* controldata functions
*
* Copyright (c) 2010-2015, PostgreSQL Global Development Group
*
contrib
/pg_upgrade/controldata.c
*
src/bin
/pg_upgrade/controldata.c
*/
#include "postgres_fe.h"
...
...
contrib
/pg_upgrade/dump.c
→
src/bin
/pg_upgrade/dump.c
View file @
9fa8b0ee
...
...
@@ -4,7 +4,7 @@
* dump functions
*
* Copyright (c) 2010-2015, PostgreSQL Global Development Group
*
contrib
/pg_upgrade/dump.c
*
src/bin
/pg_upgrade/dump.c
*/
#include "postgres_fe.h"
...
...
contrib
/pg_upgrade/exec.c
→
src/bin
/pg_upgrade/exec.c
View file @
9fa8b0ee
...
...
@@ -4,7 +4,7 @@
* execution functions
*
* Copyright (c) 2010-2015, PostgreSQL Global Development Group
*
contrib
/pg_upgrade/exec.c
*
src/bin
/pg_upgrade/exec.c
*/
#include "postgres_fe.h"
...
...
contrib
/pg_upgrade/file.c
→
src/bin
/pg_upgrade/file.c
View file @
9fa8b0ee
...
...
@@ -4,7 +4,7 @@
* file system operations
*
* Copyright (c) 2010-2015, PostgreSQL Global Development Group
*
contrib
/pg_upgrade/file.c
*
src/bin
/pg_upgrade/file.c
*/
#include "postgres_fe.h"
...
...
contrib
/pg_upgrade/function.c
→
src/bin
/pg_upgrade/function.c
View file @
9fa8b0ee
...
...
@@ -4,7 +4,7 @@
* server-side function support
*
* Copyright (c) 2010-2015, PostgreSQL Global Development Group
*
contrib
/pg_upgrade/function.c
*
src/bin
/pg_upgrade/function.c
*/
#include "postgres_fe.h"
...
...
contrib
/pg_upgrade/info.c
→
src/bin
/pg_upgrade/info.c
View file @
9fa8b0ee
...
...
@@ -4,7 +4,7 @@
* information support functions
*
* Copyright (c) 2010-2015, PostgreSQL Global Development Group
*
contrib
/pg_upgrade/info.c
*
src/bin
/pg_upgrade/info.c
*/
#include "postgres_fe.h"
...
...
contrib
/pg_upgrade/option.c
→
src/bin
/pg_upgrade/option.c
View file @
9fa8b0ee
...
...
@@ -4,7 +4,7 @@
* options functions
*
* Copyright (c) 2010-2015, PostgreSQL Global Development Group
*
contrib
/pg_upgrade/option.c
*
src/bin
/pg_upgrade/option.c
*/
#include "postgres_fe.h"
...
...
contrib
/pg_upgrade/page.c
→
src/bin
/pg_upgrade/page.c
View file @
9fa8b0ee
...
...
@@ -4,7 +4,7 @@
* per-page conversion operations
*
* Copyright (c) 2010-2015, PostgreSQL Global Development Group
*
contrib
/pg_upgrade/page.c
*
src/bin
/pg_upgrade/page.c
*/
#include "postgres_fe.h"
...
...
contrib
/pg_upgrade/parallel.c
→
src/bin
/pg_upgrade/parallel.c
View file @
9fa8b0ee
...
...
@@ -4,7 +4,7 @@
* multi-process support
*
* Copyright (c) 2010-2015, PostgreSQL Global Development Group
*
contrib
/pg_upgrade/parallel.c
*
src/bin
/pg_upgrade/parallel.c
*/
#include "postgres_fe.h"
...
...
contrib
/pg_upgrade/pg_upgrade.c
→
src/bin
/pg_upgrade/pg_upgrade.c
View file @
9fa8b0ee
...
...
@@ -4,7 +4,7 @@
* main source file
*
* Copyright (c) 2010-2015, PostgreSQL Global Development Group
*
contrib
/pg_upgrade/pg_upgrade.c
*
src/bin
/pg_upgrade/pg_upgrade.c
*/
/*
...
...
contrib
/pg_upgrade/pg_upgrade.h
→
src/bin
/pg_upgrade/pg_upgrade.h
View file @
9fa8b0ee
...
...
@@ -2,7 +2,7 @@
* pg_upgrade.h
*
* Copyright (c) 2010-2015, PostgreSQL Global Development Group
*
contrib
/pg_upgrade/pg_upgrade.h
*
src/bin
/pg_upgrade/pg_upgrade.h
*/
#include <unistd.h>
...
...
contrib
/pg_upgrade/relfilenode.c
→
src/bin
/pg_upgrade/relfilenode.c
View file @
9fa8b0ee
...
...
@@ -4,7 +4,7 @@
* relfilenode functions
*
* Copyright (c) 2010-2015, PostgreSQL Global Development Group
*
contrib
/pg_upgrade/relfilenode.c
*
src/bin
/pg_upgrade/relfilenode.c
*/
#include "postgres_fe.h"
...
...
contrib
/pg_upgrade/server.c
→
src/bin
/pg_upgrade/server.c
View file @
9fa8b0ee
...
...
@@ -4,7 +4,7 @@
* database server functions
*
* Copyright (c) 2010-2015, PostgreSQL Global Development Group
*
contrib
/pg_upgrade/server.c
*
src/bin
/pg_upgrade/server.c
*/
#include "postgres_fe.h"
...
...
contrib
/pg_upgrade/tablespace.c
→
src/bin
/pg_upgrade/tablespace.c
View file @
9fa8b0ee
...
...
@@ -4,7 +4,7 @@
* tablespace functions
*
* Copyright (c) 2010-2015, PostgreSQL Global Development Group
*
contrib
/pg_upgrade/tablespace.c
*
src/bin
/pg_upgrade/tablespace.c
*/
#include "postgres_fe.h"
...
...
contrib
/pg_upgrade/test.sh
→
src/bin
/pg_upgrade/test.sh
View file @
9fa8b0ee
#!/bin/sh
#
contrib
/pg_upgrade/test.sh
#
src/bin
/pg_upgrade/test.sh
#
# Test driver for pg_upgrade. Initializes a new database cluster,
# runs the regression tests (to put in some data), runs pg_dumpall,
...
...
@@ -21,7 +21,7 @@ unset MAKELEVEL
# authentication configuration.
standard_initdb
()
{
"
$1
"
-N
../../
src/
test/regress/pg_regress
--config-auth
"
$PGDATA
"
../../test/regress/pg_regress
--config-auth
"
$PGDATA
"
}
# Establish how the server will listen for connections
...
...
@@ -92,9 +92,9 @@ fi
:
${
oldbindir
=
$bindir
}
:
${
oldsrc
=../..
}
:
${
oldsrc
=../..
/..
}
oldsrc
=
`
cd
"
$oldsrc
"
&&
pwd
`
newsrc
=
`
cd
../..
&&
pwd
`
newsrc
=
`
cd
../..
/..
&&
pwd
`
PATH
=
$bindir
:
$PATH
export
PATH
...
...
contrib
/pg_upgrade/util.c
→
src/bin
/pg_upgrade/util.c
View file @
9fa8b0ee
...
...
@@ -4,7 +4,7 @@
* utility functions
*
* Copyright (c) 2010-2015, PostgreSQL Global Development Group
*
contrib
/pg_upgrade/util.c
*
src/bin
/pg_upgrade/util.c
*/
#include "postgres_fe.h"
...
...
contrib
/pg_upgrade/version.c
→
src/bin
/pg_upgrade/version.c
View file @
9fa8b0ee
...
...
@@ -4,7 +4,7 @@
* Postgres-version-specific routines
*
* Copyright (c) 2010-2015, PostgreSQL Global Development Group
*
contrib
/pg_upgrade/version.c
*
src/bin
/pg_upgrade/version.c
*/
#include "postgres_fe.h"
...
...
src/tools/msvc/Mkvcbuild.pm
View file @
9fa8b0ee
...
...
@@ -31,18 +31,18 @@ my $libpq;
# Set of variables for contrib modules
my
$contrib_defines
=
{
'
refint
'
=>
'
REFINT_VERBOSE
'
};
my
@contrib_uselibpq
=
('
dblink
',
'
oid2name
',
'
p
g_upgrade
',
'
p
ostgres_fdw
',
'
vacuumlo
');
('
dblink
',
'
oid2name
',
'
postgres_fdw
',
'
vacuumlo
');
my
@contrib_uselibpgport
=
(
'
oid2name
',
'
pg_standby
',
'
pg_test_fsync
',
'
pg_test_timing
',
'
pg_
upgrade
',
'
pg_
xlogdump
',
'
pg_xlogdump
',
'
vacuumlo
');
my
@contrib_uselibpgcommon
=
(
'
oid2name
',
'
pg_standby
',
'
pg_test_fsync
',
'
pg_test_timing
',
'
pg_
upgrade
',
'
pg_
xlogdump
',
'
pg_xlogdump
',
'
vacuumlo
');
my
$contrib_extralibs
=
undef
;
my
$contrib_extraincludes
=
...
...
@@ -54,9 +54,9 @@ my @contrib_excludes = ('pgcrypto', 'intagg', 'sepgsql');
# Set of variables for frontend modules
my
$frontend_defines
=
{
'
initdb
'
=>
'
FRONTEND
'
};
my
@frontend_uselibpq
=
('
pg_ctl
',
'
pgbench
',
'
psql
');
my
@frontend_uselibpgport
=
(
'
pg_archivecleanup
',
'
pgbench
'
);
my
@frontend_uselibpgcommon
=
(
'
pg_archivecleanup
',
'
pgbench
'
);
my
@frontend_uselibpq
=
('
pg_ctl
',
'
pg
_upgrade
',
'
pg
bench
',
'
psql
');
my
@frontend_uselibpgport
=
(
'
pg_archivecleanup
',
'
pg
_upgrade
',
'
pg
bench
'
);
my
@frontend_uselibpgcommon
=
(
'
pg_archivecleanup
',
'
pg
_upgrade
',
'
pg
bench
'
);
my
$frontend_extralibs
=
{
'
initdb
'
=>
['
ws2_32.lib
'],
'
pg_restore
'
=>
['
ws2_32.lib
'],
...
...
src/tools/msvc/vcregress.pl
View file @
9fa8b0ee
...
...
@@ -269,7 +269,7 @@ sub upgradecheck
$ENV
{
PGHOST
}
=
'
localhost
';
$ENV
{
PGPORT
}
||=
50432
;
my
$tmp_root
=
"
$topdir
/
contrib
/pg_upgrade/tmp_check
";
my
$tmp_root
=
"
$topdir
/
src/bin
/pg_upgrade/tmp_check
";
(
mkdir
$tmp_root
||
die
$!
)
unless
-
d
$tmp_root
;
my
$tmp_install
=
"
$tmp_root
/install
";
print
"
Setting up temp install
\n\n
";
...
...
@@ -282,7 +282,7 @@ sub upgradecheck
$ENV
{
PATH
}
=
"
$bindir
;
$ENV
{PATH}
";
my
$data
=
"
$tmp_root
/data
";
$ENV
{
PGDATA
}
=
"
$data
.old
";
my
$logdir
=
"
$topdir
/
contrib
/pg_upgrade/log
";
my
$logdir
=
"
$topdir
/
src/bin
/pg_upgrade/log
";
(
mkdir
$logdir
||
die
$!
)
unless
-
d
$logdir
;
print
"
\n
Running initdb on old cluster
\n\n
";
standard_initdb
()
or
exit
1
;
...
...
@@ -292,7 +292,7 @@ sub upgradecheck
installcheck
();
# now we can chdir into the source dir
chdir
"
$topdir
/
contrib
/pg_upgrade
";
chdir
"
$topdir
/
src/bin
/pg_upgrade
";
print
"
\n
Dumping old cluster
\n\n
";
system
("
pg_dumpall -f
$tmp_root
/dump1.sql
")
==
0
or
exit
1
;
print
"
\n
Stopping old cluster
\n\n
";
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment