I have multiple PostgreSQL servers installed. How do I disable auto boot for older server?

Solution 1:

For less of a hack, edit /etc/postgresql/9.1/main/start.conf and replace auto with manual or disabled.

Note: Invoke systemctl daemon-reload after editing this file.

Solution 2:

Debian created several scripts (like the pg_*cluster utilities) to simplify running multiple versions or installations of PostgreSQL on a single server, which is why this isn't documented on postgresql.org.

I'm not sure if PostgreSQL's own .deb package uses the same startup mechanism as Debian, but looking at the package I have, if you create /etc/init.d/postgresql-9.1 (even if its an empty file) then /etc/init.d/postgresql will assume you want to control that version separately and won't start it by default. You can still start it with

service postgresql start 9.1

to override the version search.