postgresql升级备份和恢复相同端口

发布于 2024-10-27 06:33:55 字数 416 浏览 4 评论 0原文

这里,我想将postgresql从8.3(端口5432)升级到9.0(端口5433) 发生什么情况

-First I instal the postgres new version 9.0 on port 5433
-Than I backup and restore database by using comman,

 /usr/local/pgsql/bin/ pg_dumpall -U -h  -p 5432|psql -U  -p 5433 -h

-After that I stop both server 8.3 and 9.0
-By using pgAdmin III, I change port the server 9.0 from 5433 to 5432.

如果我尝试用这种方式升级会

?谢谢 :)

Here, I want to upgrade postgresql from 8.3(port 5432) to 9.0(port 5433)
Whats happen if,

-First I instal the postgres new version 9.0 on port 5433
-Than I backup and restore database by using comman,

 /usr/local/pgsql/bin/ pg_dumpall -U -h  -p 5432|psql -U  -p 5433 -h

-After that I stop both server 8.3 and 9.0
-By using pgAdmin III, I change port the server 9.0 from 5433 to 5432.

Whats happen if I try to upgrade with that way?

thanks :)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

零時差 2024-11-03 06:33:55

这会起作用。这也应该比写入文件更快,因为需要更少的写入。但请记住将旧数据库置于单用户模式(postgres --single ...),这样在迁移过程中就没有人会写入数据库。

您还可以使用 pg_upgrade 就地升级数据库。但请检查从 8.3 升级时的限制

This would work. This should also be faster than writing to file, as less writes will be needed. But remember to put old database in single user mode (postgres --single ...) so nobody would write to the database during migration.

You can also use pg_upgrade to upgrade database in place. But check for limitations while upgrading from 8.3.

习惯成性 2024-11-03 06:33:55

正如托梅茨基已经说过的,这应该可行。

为了使图片更完整:

在 9.0 中,您还可以使用 pg_upgrade 进行迁移,这应该比使用带有管道的 pg_dump 更快。

As Tometzky has already said, this should work.

Just to make the picture complete:

With 9.0 you can also use pg_upgrade for the migration which should be even faster than using pg_dump with a pipe.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文