Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 9885206

Browse files
committed
Move pg_upgrade shared library out into its own /contrib directory
(pg_upgrade_support).
1 parent c7c012c commit 9885206

File tree

7 files changed

+38
-24
lines changed

7 files changed

+38
-24
lines changed

contrib/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $PostgreSQL: pgsql/contrib/Makefile,v 1.91 2010/05/12 16:50:58 tgl Exp $
1+
# $PostgreSQL: pgsql/contrib/Makefile,v 1.92 2010/05/13 01:03:00 momjian Exp $
22

33
subdir = contrib
44
top_builddir = ..
@@ -32,6 +32,7 @@ SUBDIRS = \
3232
pg_stat_statements \
3333
pg_trgm \
3434
pg_upgrade \
35+
pg_upgrade_support \
3536
pgbench \
3637
pgcrypto \
3738
pgrowlocks \

contrib/pg_upgrade/Makefile

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
#
22
# Makefile for pg_upgrade
33
#
4-
# targets: all, clean, install, uninstall
5-
#
6-
# This Makefile generates an executable and a shared object file
7-
#
84

95
PGFILEDESC = "pg_upgrade - an in-place binary upgrade utility"
106
PGAPPICON = win32
@@ -14,8 +10,6 @@ OBJS = check.o controldata.o dump.o exec.o file.o function.o info.o \
1410
option.o page.o pg_upgrade.o relfilenode.o server.o \
1511
tablespace.o util.o version.o version_old_8_3.o $(WIN32RES)
1612

17-
MODULES = pg_upgrade_sysoids
18-
1913
PG_CPPFLAGS = -DFRONTEND -DDLSUFFIX=\"$(DLSUFFIX)\" -I$(srcdir) -I$(libpq_srcdir)
2014
PG_LIBS = $(libpq_pgport)
2115

contrib/pg_upgrade/check.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -232,15 +232,15 @@ check_cluster_compatibility(migratorContext *ctx, bool live_check)
232232
FILE *lib_test;
233233

234234
/*
235-
* Test pg_upgrade_sysoids.so is in the proper place. We cannot copy it
235+
* Test pg_upgrade_support.so is in the proper place. We cannot copy it
236236
* ourselves because install directories are typically root-owned.
237237
*/
238-
snprintf(libfile, sizeof(libfile), "%s/pg_upgrade_sysoids%s", ctx->new.libpath,
238+
snprintf(libfile, sizeof(libfile), "%s/pg_upgrade_support%s", ctx->new.libpath,
239239
DLSUFFIX);
240240

241241
if ((lib_test = fopen(libfile, "r")) == NULL)
242242
pg_log(ctx, PG_FATAL,
243-
"\npg_upgrade%s must be created and installed in %s\n", DLSUFFIX, libfile);
243+
"\npg_upgrade_support%s must be created and installed in %s\n", DLSUFFIX, libfile);
244244
else
245245
fclose(lib_test);
246246

contrib/pg_upgrade/function.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,43 +42,43 @@ install_support_functions(migratorContext *ctx)
4242
"CREATE OR REPLACE FUNCTION "
4343
" binary_upgrade.set_next_pg_type_oid(OID) "
4444
"RETURNS VOID "
45-
"AS '$libdir/pg_upgrade_sysoids' "
45+
"AS '$libdir/pg_upgrade_support' "
4646
"LANGUAGE C STRICT;"));
4747
PQclear(executeQueryOrDie(ctx, conn,
4848
"CREATE OR REPLACE FUNCTION "
4949
" binary_upgrade.set_next_pg_type_array_oid(OID) "
5050
"RETURNS VOID "
51-
"AS '$libdir/pg_upgrade_sysoids' "
51+
"AS '$libdir/pg_upgrade_support' "
5252
"LANGUAGE C STRICT;"));
5353
PQclear(executeQueryOrDie(ctx, conn,
5454
"CREATE OR REPLACE FUNCTION "
5555
" binary_upgrade.set_next_pg_type_toast_oid(OID) "
5656
"RETURNS VOID "
57-
"AS '$libdir/pg_upgrade_sysoids' "
57+
"AS '$libdir/pg_upgrade_support' "
5858
"LANGUAGE C STRICT;"));
5959
PQclear(executeQueryOrDie(ctx, conn,
6060
"CREATE OR REPLACE FUNCTION "
6161
" binary_upgrade.set_next_heap_relfilenode(OID) "
6262
"RETURNS VOID "
63-
"AS '$libdir/pg_upgrade_sysoids' "
63+
"AS '$libdir/pg_upgrade_support' "
6464
"LANGUAGE C STRICT;"));
6565
PQclear(executeQueryOrDie(ctx, conn,
6666
"CREATE OR REPLACE FUNCTION "
6767
" binary_upgrade.set_next_toast_relfilenode(OID) "
6868
"RETURNS VOID "
69-
"AS '$libdir/pg_upgrade_sysoids' "
69+
"AS '$libdir/pg_upgrade_support' "
7070
"LANGUAGE C STRICT;"));
7171
PQclear(executeQueryOrDie(ctx, conn,
7272
"CREATE OR REPLACE FUNCTION "
7373
" binary_upgrade.set_next_index_relfilenode(OID) "
7474
"RETURNS VOID "
75-
"AS '$libdir/pg_upgrade_sysoids' "
75+
"AS '$libdir/pg_upgrade_support' "
7676
"LANGUAGE C STRICT;"));
7777
PQclear(executeQueryOrDie(ctx, conn,
7878
"CREATE OR REPLACE FUNCTION "
7979
" binary_upgrade.add_pg_enum_label(OID, OID, NAME) "
8080
"RETURNS VOID "
81-
"AS '$libdir/pg_upgrade_sysoids' "
81+
"AS '$libdir/pg_upgrade_support' "
8282
"LANGUAGE C STRICT;"));
8383
PQfinish(conn);
8484
}

contrib/pg_upgrade_support/Makefile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#
2+
# Makefile for pg_upgrade_support
3+
#
4+
5+
PGFILEDESC = "pg_upgrade_support - shared library functions for pg_upgrade"
6+
7+
MODULES = pg_upgrade_support
8+
9+
ifdef USE_PGXS
10+
PG_CONFIG = pg_config
11+
PGXS := $(shell $(PG_CONFIG) --pgxs)
12+
include $(PGXS)
13+
else
14+
subdir = contrib/pg_upgrade
15+
top_builddir = ../..
16+
include $(top_builddir)/src/Makefile.global
17+
include $(top_srcdir)/contrib/contrib-global.mk
18+
endif

doc/src/sgml/pgupgrade.sgml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/pgupgrade.sgml,v 1.1 2010/05/12 02:19:11 momjian Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/pgupgrade.sgml,v 1.2 2010/05/13 01:03:01 momjian Exp $ -->
22

33
<sect1 id="pgupgrade">
44
<title>pg_upgrade</title>
@@ -97,6 +97,13 @@ gmake prefix=/usr/local/pgsql.new install
9797
</para>
9898
</listitem>
9999

100+
<listitem>
101+
<para>
102+
Install <application>pg_upgrade</> and
103+
<application>pg_upgrade_support</> in the new PostgreSQL cluster
104+
</para>
105+
</listitem>
106+
100107
<listitem>
101108
<para>
102109
Initialize the new PostgreSQL cluster
@@ -123,12 +130,6 @@ gmake prefix=/usr/local/pgsql.new install
123130
delete the empty <literal>edb</> schema in the <literal>enterprisedb</> database
124131
</para>
125132
</listitem>
126-
<listitem>
127-
<para>
128-
copy dbserver/lib/pgmemcache.so from the old server
129-
to the new server (AS8.3 to AS8.3R2 migrations only)
130-
</para>
131-
</listitem>
132133
</itemizedlist>
133134
</para>
134135
</listitem>

0 commit comments

Comments
 (0)