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
9885206c
Commit
9885206c
authored
May 13, 2010
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move pg_upgrade shared library out into its own /contrib directory
(pg_upgrade_support).
parent
c7c012ce
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
38 additions
and
24 deletions
+38
-24
contrib/Makefile
contrib/Makefile
+2
-1
contrib/pg_upgrade/Makefile
contrib/pg_upgrade/Makefile
+0
-6
contrib/pg_upgrade/check.c
contrib/pg_upgrade/check.c
+3
-3
contrib/pg_upgrade/function.c
contrib/pg_upgrade/function.c
+7
-7
contrib/pg_upgrade_support/Makefile
contrib/pg_upgrade_support/Makefile
+18
-0
contrib/pg_upgrade_support/pg_upgrade_support.c
contrib/pg_upgrade_support/pg_upgrade_support.c
+0
-0
doc/src/sgml/pgupgrade.sgml
doc/src/sgml/pgupgrade.sgml
+8
-7
No files found.
contrib/Makefile
View file @
9885206c
# $PostgreSQL: pgsql/contrib/Makefile,v 1.9
1 2010/05/12 16:50:58 tgl
Exp $
# $PostgreSQL: pgsql/contrib/Makefile,v 1.9
2 2010/05/13 01:03:00 momjian
Exp $
subdir
=
contrib
subdir
=
contrib
top_builddir
=
..
top_builddir
=
..
...
@@ -32,6 +32,7 @@ SUBDIRS = \
...
@@ -32,6 +32,7 @@ SUBDIRS = \
pg_stat_statements
\
pg_stat_statements
\
pg_trgm
\
pg_trgm
\
pg_upgrade
\
pg_upgrade
\
pg_upgrade_support
\
pgbench
\
pgbench
\
pgcrypto
\
pgcrypto
\
pgrowlocks
\
pgrowlocks
\
...
...
contrib/pg_upgrade/Makefile
View file @
9885206c
#
#
# Makefile for pg_upgrade
# Makefile for pg_upgrade
#
#
# targets: all, clean, install, uninstall
#
# This Makefile generates an executable and a shared object file
#
PGFILEDESC
=
"pg_upgrade - an in-place binary upgrade utility"
PGFILEDESC
=
"pg_upgrade - an in-place binary upgrade utility"
PGAPPICON
=
win32
PGAPPICON
=
win32
...
@@ -14,8 +10,6 @@ OBJS = check.o controldata.o dump.o exec.o file.o function.o info.o \
...
@@ -14,8 +10,6 @@ OBJS = check.o controldata.o dump.o exec.o file.o function.o info.o \
option.o page.o pg_upgrade.o relfilenode.o server.o
\
option.o page.o pg_upgrade.o relfilenode.o server.o
\
tablespace.o util.o version.o version_old_8_3.o
$(WIN32RES)
tablespace.o util.o version.o version_old_8_3.o
$(WIN32RES)
MODULES
=
pg_upgrade_sysoids
PG_CPPFLAGS
=
-DFRONTEND
-DDLSUFFIX
=
\"
$(DLSUFFIX)
\"
-I
$(srcdir)
-I
$(libpq_srcdir)
PG_CPPFLAGS
=
-DFRONTEND
-DDLSUFFIX
=
\"
$(DLSUFFIX)
\"
-I
$(srcdir)
-I
$(libpq_srcdir)
PG_LIBS
=
$(libpq_pgport)
PG_LIBS
=
$(libpq_pgport)
...
...
contrib/pg_upgrade/check.c
View file @
9885206c
...
@@ -232,15 +232,15 @@ check_cluster_compatibility(migratorContext *ctx, bool live_check)
...
@@ -232,15 +232,15 @@ check_cluster_compatibility(migratorContext *ctx, bool live_check)
FILE
*
lib_test
;
FILE
*
lib_test
;
/*
/*
* Test pg_upgrade_s
ysoids
.so is in the proper place. We cannot copy it
* Test pg_upgrade_s
upport
.so is in the proper place. We cannot copy it
* ourselves because install directories are typically root-owned.
* ourselves because install directories are typically root-owned.
*/
*/
snprintf
(
libfile
,
sizeof
(
libfile
),
"%s/pg_upgrade_s
ysoids
%s"
,
ctx
->
new
.
libpath
,
snprintf
(
libfile
,
sizeof
(
libfile
),
"%s/pg_upgrade_s
upport
%s"
,
ctx
->
new
.
libpath
,
DLSUFFIX
);
DLSUFFIX
);
if
((
lib_test
=
fopen
(
libfile
,
"r"
))
==
NULL
)
if
((
lib_test
=
fopen
(
libfile
,
"r"
))
==
NULL
)
pg_log
(
ctx
,
PG_FATAL
,
pg_log
(
ctx
,
PG_FATAL
,
"
\n
pg_upgrade%s must be created and installed in %s
\n
"
,
DLSUFFIX
,
libfile
);
"
\n
pg_upgrade
_support
%s must be created and installed in %s
\n
"
,
DLSUFFIX
,
libfile
);
else
else
fclose
(
lib_test
);
fclose
(
lib_test
);
...
...
contrib/pg_upgrade/function.c
View file @
9885206c
...
@@ -42,43 +42,43 @@ install_support_functions(migratorContext *ctx)
...
@@ -42,43 +42,43 @@ install_support_functions(migratorContext *ctx)
"CREATE OR REPLACE FUNCTION "
"CREATE OR REPLACE FUNCTION "
" binary_upgrade.set_next_pg_type_oid(OID) "
" binary_upgrade.set_next_pg_type_oid(OID) "
"RETURNS VOID "
"RETURNS VOID "
"AS '$libdir/pg_upgrade_s
ysoids
' "
"AS '$libdir/pg_upgrade_s
upport
' "
"LANGUAGE C STRICT;"
));
"LANGUAGE C STRICT;"
));
PQclear
(
executeQueryOrDie
(
ctx
,
conn
,
PQclear
(
executeQueryOrDie
(
ctx
,
conn
,
"CREATE OR REPLACE FUNCTION "
"CREATE OR REPLACE FUNCTION "
" binary_upgrade.set_next_pg_type_array_oid(OID) "
" binary_upgrade.set_next_pg_type_array_oid(OID) "
"RETURNS VOID "
"RETURNS VOID "
"AS '$libdir/pg_upgrade_s
ysoids
' "
"AS '$libdir/pg_upgrade_s
upport
' "
"LANGUAGE C STRICT;"
));
"LANGUAGE C STRICT;"
));
PQclear
(
executeQueryOrDie
(
ctx
,
conn
,
PQclear
(
executeQueryOrDie
(
ctx
,
conn
,
"CREATE OR REPLACE FUNCTION "
"CREATE OR REPLACE FUNCTION "
" binary_upgrade.set_next_pg_type_toast_oid(OID) "
" binary_upgrade.set_next_pg_type_toast_oid(OID) "
"RETURNS VOID "
"RETURNS VOID "
"AS '$libdir/pg_upgrade_s
ysoids
' "
"AS '$libdir/pg_upgrade_s
upport
' "
"LANGUAGE C STRICT;"
));
"LANGUAGE C STRICT;"
));
PQclear
(
executeQueryOrDie
(
ctx
,
conn
,
PQclear
(
executeQueryOrDie
(
ctx
,
conn
,
"CREATE OR REPLACE FUNCTION "
"CREATE OR REPLACE FUNCTION "
" binary_upgrade.set_next_heap_relfilenode(OID) "
" binary_upgrade.set_next_heap_relfilenode(OID) "
"RETURNS VOID "
"RETURNS VOID "
"AS '$libdir/pg_upgrade_s
ysoids
' "
"AS '$libdir/pg_upgrade_s
upport
' "
"LANGUAGE C STRICT;"
));
"LANGUAGE C STRICT;"
));
PQclear
(
executeQueryOrDie
(
ctx
,
conn
,
PQclear
(
executeQueryOrDie
(
ctx
,
conn
,
"CREATE OR REPLACE FUNCTION "
"CREATE OR REPLACE FUNCTION "
" binary_upgrade.set_next_toast_relfilenode(OID) "
" binary_upgrade.set_next_toast_relfilenode(OID) "
"RETURNS VOID "
"RETURNS VOID "
"AS '$libdir/pg_upgrade_s
ysoids
' "
"AS '$libdir/pg_upgrade_s
upport
' "
"LANGUAGE C STRICT;"
));
"LANGUAGE C STRICT;"
));
PQclear
(
executeQueryOrDie
(
ctx
,
conn
,
PQclear
(
executeQueryOrDie
(
ctx
,
conn
,
"CREATE OR REPLACE FUNCTION "
"CREATE OR REPLACE FUNCTION "
" binary_upgrade.set_next_index_relfilenode(OID) "
" binary_upgrade.set_next_index_relfilenode(OID) "
"RETURNS VOID "
"RETURNS VOID "
"AS '$libdir/pg_upgrade_s
ysoids
' "
"AS '$libdir/pg_upgrade_s
upport
' "
"LANGUAGE C STRICT;"
));
"LANGUAGE C STRICT;"
));
PQclear
(
executeQueryOrDie
(
ctx
,
conn
,
PQclear
(
executeQueryOrDie
(
ctx
,
conn
,
"CREATE OR REPLACE FUNCTION "
"CREATE OR REPLACE FUNCTION "
" binary_upgrade.add_pg_enum_label(OID, OID, NAME) "
" binary_upgrade.add_pg_enum_label(OID, OID, NAME) "
"RETURNS VOID "
"RETURNS VOID "
"AS '$libdir/pg_upgrade_s
ysoids
' "
"AS '$libdir/pg_upgrade_s
upport
' "
"LANGUAGE C STRICT;"
));
"LANGUAGE C STRICT;"
));
PQfinish
(
conn
);
PQfinish
(
conn
);
}
}
...
...
contrib/pg_upgrade_support/Makefile
0 → 100644
View file @
9885206c
#
# Makefile for pg_upgrade_support
#
PGFILEDESC
=
"pg_upgrade_support - shared library functions for pg_upgrade"
MODULES
=
pg_upgrade_support
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
contrib/pg_upgrade
/pg_upgrade_sysoids
.c
→
contrib/pg_upgrade
_support/pg_upgrade_support
.c
View file @
9885206c
File moved
doc/src/sgml/pgupgrade.sgml
View file @
9885206c
<!-- $PostgreSQL: pgsql/doc/src/sgml/pgupgrade.sgml,v 1.
1 2010/05/12 02:19:1
1 momjian Exp $ -->
<!-- $PostgreSQL: pgsql/doc/src/sgml/pgupgrade.sgml,v 1.
2 2010/05/13 01:03:0
1 momjian Exp $ -->
<sect1 id="pgupgrade">
<sect1 id="pgupgrade">
<title>pg_upgrade</title>
<title>pg_upgrade</title>
...
@@ -97,6 +97,13 @@ gmake prefix=/usr/local/pgsql.new install
...
@@ -97,6 +97,13 @@ gmake prefix=/usr/local/pgsql.new install
</para>
</para>
</listitem>
</listitem>
<listitem>
<para>
Install <application>pg_upgrade</> and
<application>pg_upgrade_support</> in the new PostgreSQL cluster
</para>
</listitem>
<listitem>
<listitem>
<para>
<para>
Initialize the new PostgreSQL cluster
Initialize the new PostgreSQL cluster
...
@@ -123,12 +130,6 @@ gmake prefix=/usr/local/pgsql.new install
...
@@ -123,12 +130,6 @@ gmake prefix=/usr/local/pgsql.new install
delete the empty <literal>edb</> schema in the <literal>enterprisedb</> database
delete the empty <literal>edb</> schema in the <literal>enterprisedb</> database
</para>
</para>
</listitem>
</listitem>
<listitem>
<para>
copy dbserver/lib/pgmemcache.so from the old server
to the new server (AS8.3 to AS8.3R2 migrations only)
</para>
</listitem>
</itemizedlist>
</itemizedlist>
</para>
</para>
</listitem>
</listitem>
...
...
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