Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
5b2ebe95
G
Gpdb
项目概览
Greenplum
/
Gpdb
通知
7
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
Gpdb
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
5b2ebe95
编写于
1月 13, 2002
作者:
B
Bruce Momjian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Wow, it actually worked for the regression database. More testing needed.
上级
f5bbcfb0
变更
2
展开全部
隐藏空白更改
内联
并排
Showing
2 changed file
with
370 addition
and
356 deletion
+370
-356
doc/src/sgml/ref/pg_upgrade.sgml
doc/src/sgml/ref/pg_upgrade.sgml
+20
-36
src/bin/pg_dump/pg_upgrade
src/bin/pg_dump/pg_upgrade
+350
-320
未找到文件。
doc/src/sgml/ref/pg_upgrade.sgml
浏览文件 @
5b2ebe95
<!--
<!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/Attic/pg_upgrade.sgml,v 1.
19 2002/01/11 20:48:47
momjian Exp $
$Header: /cvsroot/pgsql/doc/src/sgml/ref/Attic/pg_upgrade.sgml,v 1.
20 2002/01/13 01:13:59
momjian Exp $
PostgreSQL documentation
PostgreSQL documentation
-->
-->
...
@@ -23,9 +23,10 @@ PostgreSQL documentation
...
@@ -23,9 +23,10 @@ PostgreSQL documentation
<refsynopsisdivinfo>
<refsynopsisdivinfo>
<date>1999-07-31</date>
<date>1999-07-31</date>
</refsynopsisdivinfo>
</refsynopsisdivinfo>
<synopsis>
<cmdsynopsis>
pg_upgrade -s <replaceable class="parameter">filename</replaceable> <replaceable class="parameter">old_data_dir</replaceable>
<command>pg_upgrade</command>
</synopsis>
<group choice="plain"><arg>-1</arg><arg>-2</arg></group>
</cmdsynopsis>
</refsynopsisdiv>
</refsynopsisdiv>
<refsect1 id="R1-APP-PG-UPGRADE-1">
<refsect1 id="R1-APP-PG-UPGRADE-1">
...
@@ -56,31 +57,20 @@ pg_upgrade -s <replaceable class="parameter">filename</replaceable> <replaceable
...
@@ -56,31 +57,20 @@ pg_upgrade -s <replaceable class="parameter">filename</replaceable> <replaceable
<step performance="required">
<step performance="required">
<para>
<para>
Then do:
Copy the program <filename>pgsql/src/bin/pg_dump/pg_upgrade</filename>
<programlisting>
from the current PostgreSQL distribution into somewhere in your path.
$ pg_dumpall -s > schema.out
</programlisting>
to dump out your old database's table definitions without any data.
</para>
</step>
<step performance="required">
<para>
<command>VACUUM</command> your entire database using
<command>vacuumdb -a</command.>
</para>
</para>
</step>
</step>
<step performance="required">
<step performance="required">
<para>
<para>
Stop the old postmaster and all backends.
Change your working directory to the
</para>
pgsql main directory, and type:
</step>
<programlisting>
$ pg_upgrade -1
<step performance="required">
</programlisting>
<para>
to collect information about the old database needed for the
Rename (using mv) your old pgsql <filename>data/</filename> directory to
upgrade.
<filename>data.old/</filename>.
</para>
</para>
</step>
</step>
...
@@ -109,14 +99,15 @@ $ make install
...
@@ -109,14 +99,15 @@ $ make install
<step performance="required">
<step performance="required">
<para>
<para>
Run <application>initdb</application> to create a new template1 database
Run <application>initdb</application> to create a new template1 database
containing the system tables for the new release.
containing the system tables for the new release. Make sure you use
settings similar to those used in your previous version.
</para>
</para>
</step>
</step>
<step performance="required">
<step performance="required">
<para>
<para>
Start the new postmaster. (Note: it is critical that no users connect
Start the new postmaster. (Note: it is critical that no users connect
to the
database
until the upgrade is complete. You may wish to start
to the
server
until the upgrade is complete. You may wish to start
the postmaster without -i and/or alter <filename>pg_hba.conf</filename>
the postmaster without -i and/or alter <filename>pg_hba.conf</filename>
temporarily.)
temporarily.)
</para>
</para>
...
@@ -127,7 +118,7 @@ $ make install
...
@@ -127,7 +118,7 @@ $ make install
Change your working directory to the
Change your working directory to the
pgsql main directory, and type:
pgsql main directory, and type:
<programlisting>
<programlisting>
$ pg_upgrade -
s schema.out data.old
$ pg_upgrade -
2
</programlisting>
</programlisting>
The program will do some checking to make sure everything is properly
The program will do some checking to make sure everything is properly
configured, and will run your db.out script to recreate all the databases
configured, and will run your db.out script to recreate all the databases
...
@@ -149,7 +140,7 @@ $ pg_upgrade -s schema.out data.old
...
@@ -149,7 +140,7 @@ $ pg_upgrade -s schema.out data.old
<step performance="required">
<step performance="required">
<para>
<para>
<emphasis>Carefully</emphasis> examine the contents of the upgraded
<emphasis>Carefully</emphasis> examine the contents of the upgraded
database. If you detect problems, you'll need to recover by restoring
database
s
. If you detect problems, you'll need to recover by restoring
from your full pg_dump backup.
from your full pg_dump backup.
You can delete the <filename>data.old/</filename> directory when you
You can delete the <filename>data.old/</filename> directory when you
are satisfied.
are satisfied.
...
@@ -158,18 +149,11 @@ $ pg_upgrade -s schema.out data.old
...
@@ -158,18 +149,11 @@ $ pg_upgrade -s schema.out data.old
<step performance="required">
<step performance="required">
<para>
<para>
The upgraded database will be in an un-vacuumed state. You will probably
The upgraded database
s
will be in an un-vacuumed state. You will probably
want to run a <command>VACUUM ANALYZE</command> before beginning
want to run a <command>VACUUM ANALYZE</command> before beginning
production work.
production work.
</para>
</para>
</step>
</step>
<note>
<para>
pg_upgrade does not handle custom tables/indexes/sequences in template1.
It does handle other template1 object customizations.
</para>
</note>
</procedure>
</procedure>
</refsect1>
</refsect1>
</refentry>
</refentry>
...
...
src/bin/pg_dump/pg_upgrade
浏览文件 @
5b2ebe95
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录