六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 293|回复: 0

PostgresQL 版本升级 8.1 to 8.3

[复制链接]

升级  52%

32

主题

32

主题

32

主题

秀才

Rank: 2

积分
128
 楼主| 发表于 2013-1-30 01:38:34 | 显示全部楼层 |阅读模式
参考文档写了个Windows版的:

PostgresQL Upgrade 8.1 to 8.3.7 (Windows)

1, 运行 -> services.msc
找到PostgreSQL Database Server 8.1
右键 -> stop; properties -> startup type -> manual,
OK

2,解压postgresql-8.3.7-1.zip

3,运行postgresql-8.3.msi

... -> Next -> service configuration

Account name : postgres8.3
如果没有此账号则由程序生成

Address 后面的checkbox勾上
Client UTF8

一路Next……

4,运行-> services.msc
找到PostgreSQL Database Server 8.3
右键 -> stop; properties -> startup type -> manual,OK

找到PostgreSQL Database Server 8.1
右键 -> start;

5,cmd -> 切换当前目录到刚刚装的8.3/bin下

E:\Program Files\PostgreSQL\8.3\bin>

pg_dumpall –U postgres > e:\db8.1.out   (postgres是postgresql 8.1的一个用户名e:\db8.1.out是导出的备份文件)

找到PostgreSQL Database Server 8.1
右键 -> stop;

找到PostgreSQL Database Server 8.3
右键 -> start; properties -> startup type -> automatic,OK


E:\Program Files\PostgreSQL\8.3\bin>

Psql –U postgres -f e:\db8.1.out   (postgres是postgresql 8.3的一个用户名e:\db8.1.out是导出的备份文件)

vacuumdb –U postgres -a –z (postgres是postgresql 8.3的一个用户名)

使用postgresql-8.3-603.jdbc4.jar
替代原来的postgresql-8.1-404.jdbc3.jar

旧的8.1可以选择自行删除,但是建议保留。

OVER
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表