我安装了 postgresql 9.3。 我还想安装 postgres 9.6.1。
每个应用程序都使用不同的数据库。大多数时候我不会同时运行这两个应用程序,因此不需要它们同时运行。
我下载了postgres推荐的安装程序,并安装了9.6.1,但是9.3似乎无法再启动了。我在尝试运行 sudo service postgres start
时遇到错误:
- Starting PostgreSQL 9.3 database server
- The PostgreSQL server failed to start. Please check the log output.
日志文件是空的(不确定这是有趣的) -/var/log/postgresql/postgresql-9.3-main.log
知道如何运行这两个实例吗?
最佳答案
您需要检查 postgresql.conf 配置文件。
如果您想同时运行两个实例,那么它们需要在不同的端口上运行,否则它们会发生冲突。默认值为 5432,针对其中一个数据库更改此值。
然后确保每个实例的数据目录、日志文件都是唯一的。
关于database - 并行运行不同版本的 postgresql,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41014590/