I have postgresql 9.3 installed. I would like to have also postgres 9.6.1 installed.
我安装了postgresql 9.3。我还想安装postgres 9.6.1。
Each application is using a different DB. Most of the times I don't run both applications, so I don't need them to run concurrently.
每个应用程序都使用不同的DB。大多数时候我不会同时运行两个应用程序,所以我不需要它们同时运行。
I downloaded the installer recommended by postgres, and installed 9.6.1, but then it seems that 9.3 is not able to start anymore. I'm getting an error trying to run sudo service postgres start
:
我下载了postgres推荐的安装程序,并安装了9.6.1,但是看起来9.3再也不能启动了。我正在尝试运行sudo服务postgres开始:
- Starting PostgreSQL 9.3 database server
- 启动PostgreSQL 9.3数据库服务器
- The PostgreSQL server failed to start. Please check the log output.
- PostgreSQL服务器启动失败。请检查日志输出。
The log file is empty (not sure that's the interesting one) - /var/log/postgresql/postgresql-9.3-main.log
日志文件是空的(不确定是不是有趣的)- /var/log/postgresql/postgresql-9.3-main.log
Any idea how to be able to run both instances?
您知道如何运行这两个实例吗?
1 个解决方案
#1
2
You need to check the postgresql.conf config file.
您需要检查postgresql。conf配置文件。
If you want to run both instances at the same time then they will need to be run on different ports otherwise they will conflict. The default is 5432, change this for one of the DB's.
如果希望同时运行两个实例,则需要在不同的端口上运行它们,否则它们会发生冲突。默认值是5432,更改为DB的一个。
Then make sure that the data directory, log file are unique for each instance.
然后确保每个实例的数据目录、日志文件都是唯一的。
#1
2
You need to check the postgresql.conf config file.
您需要检查postgresql。conf配置文件。
If you want to run both instances at the same time then they will need to be run on different ports otherwise they will conflict. The default is 5432, change this for one of the DB's.
如果希望同时运行两个实例,则需要在不同的端口上运行它们,否则它们会发生冲突。默认值是5432,更改为DB的一个。
Then make sure that the data directory, log file are unique for each instance.
然后确保每个实例的数据目录、日志文件都是唯一的。