I manage an old ubuntu server 12.04 that has postgresql 9.1 on it.
I successfully installed postgresql 9.6 for a new application that we want to use.
The problem I'm facing is for some reason
service postgresql start
* Starting PostgreSQL 9.1 database server
[ OK ]
* Starting PostgreSQL 9.6 database server
[ OK ]
starts the 9.1 server and the 9.6 server.
I'm looking for a way to only start the 9.6 server on the default port.
I've looked at /etc/inid.d/postgresql. This extract looks like it might be the key.
# versions can be specified explicitly
if [ -n "$2" ]; then
versions="$2 $3 $4 $5 $6 $7 $8 $9"
else
get_versions
fi
looks like I just have to pass in the version on the command line.
service postgresql start 9.6
and yes ... it worked.
So my question is ... how do I make this automatically happen in the instance of a reboot?