我正在考虑从我的机器上升级Postgres 8.3.3到8.4.2(它有Windows Vista)。
对于可从enterprisedb.com下载的Postgres 8.4.2的Windows Installer(单击安装程序)只提供全新安装(它不能识别我当前安装的v8.3.3)。
是否有可能升级所有现有的数据库转换和可见(自动迁移?)升级后的新版本? 或者我必须做更多的事情 – 手动备份/恢复我所有的数据库?
简单的回答:你需要pg_dump,安装新鲜的8.4,然后加载。
没有这么简单的答案 – 你可以使用pg_migrator进行二进制文件升级,但是我还没有testing过。
我试过pg_migrator和:
最新版本(8.4.11)不适合我的迁移 – 它允许迁移到8.5,但我需要迁移到8.4.2。
Performing Consistency Checks Checking old data directory (c:\program files\postgresql\8.3\data)ok Checking new data directory (c:\program files\postgresql\8.4\data)ok
This binary was built using 8.5 PostgreSQL sources; it must be built using 8.4 PostgreSQL sources to match the new cluster.
但是…在pg_migrator主页上没有信息哪个版本的迁移器是Postgres的目标版本。 我已经下载并安装了v8.4.4,它似乎是正确的版本,但这里是我所说的:
mapped win32 error code 2 to 2 Old and new pg_controldata date/time storage types do not match.
You will need to rebuild the new server with configure --disable-integer-datetimes or get server binaries built with those options.
所以对我来说不是那么自动的 我认为旧的经典pg_dump /还原会做得更好。