“cannot write to log file pg_upgrade_internal.log” when upgrading from Postgresql 9.1 to 9.3

痞子三分冷 提交于 2019-12-30 07:51:12

问题


I keep on getting the above error whenever I run the following command via a postgres user.

/usr/lib/postgresql/9.3/bin/pg_upgrade \
   -b /usr/lib/postgresql/9.1/bin/ \
   -B /usr/lib/postgresql/9.3/bin/ \
   -d /var/lib/postgresql/9.1/main \
   -D /var/lib/postgresql/9.3/main

cannot write to log file pg_upgrade_internal.log Failure, exiting

I'm using Ubuntu 13.10. Both Postgresql 9.1 and 9.3 are running properly.


回答1:


Make sure that you run this command from a directory that is writable by the postgres user, like /tmp or /var/lib/postgresql:

$ cd /tmp
$ usr/lib/postgresql/9.3/bin/pg_upgrade ...


来源:https://stackoverflow.com/questions/23216734/cannot-write-to-log-file-pg-upgrade-internal-log-when-upgrading-from-postgresq

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!