我在 Amazon EC2 上使用 Ubuntu 12.04 64 位。尝试将 postgresql 从 9.1 升级到 9.2。
$ uname -a
Linux db2 3.2.0-32-virtual #51-Ubuntu SMP Wed Sep 26 21:53:42 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
$ apt-cache policy postgresql
postgresql:
Installed: 9.1+136~precise
Candidate: 9.1+136~precise
Version table:
*** 9.1+136~precise 0
500 http://ppa.launchpad.net/pitti/postgresql/ubuntu/ precise/main amd64 Packages
100 /var/lib/dpkg/status
9.1+129ubuntu1 0
500 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
9.1+129 0
500 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
我正在遵循的升级过程是:
$ sudo add-apt-repository ppa:pitti/postgresql
$ sudo apt-get update
$ sudo apt-get install postgres-9.2
$ sudo pg_dropcluster --stop 9.2 main
$ sudo pg_upgradecluster 9.1 main /var/lib/postgresql/9.2
Stopping old cluster...
Disabling connections to the old cluster during upgrade...
Restarting old cluster with restricted connections...
Creating new cluster (configuration: /etc/postgresql/9.2/main, data: /var/lib/postgresql/9.2)...
Moving configuration file /var/lib/postgresql/9.2/postgresql.conf to /etc/postgresql/9.2/main...
Moving configuration file /var/lib/postgresql/9.2/pg_hba.conf to /etc/postgresql/9.2/main...
Moving configuration file /var/lib/postgresql/9.2/pg_ident.conf to /etc/postgresql/9.2/main...
Configuring postgresql.conf to use port 5433...
Disabling connections to the new cluster during upgrade...
Roles, databases, schemas, ACLs...
Fixing hardcoded library paths for stored procedures...
ERROR: cannot set transaction read-write mode during recovery
Error: Could not fix library paths
Re-enabling connections to the old cluster...
Re-enabling connections to the new cluster...
Error during cluster dumping, removing new cluster
任何帮助,将不胜感激。谢谢你。