PostgresQL 版本升级 8.1 to 8.3
参考文档写了个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
页:
[1]