I have an old project that I'm trying to get back into, but I can't enter postgres. Running sudo -u postgres psql gives me:
Error: No existing local cluster is suitable as a default target.
Please see man pg_wrapper(1) how to specify one.
I'm wondering if this might be because I upgraded postgres to version 9.4 a few months back. This is my output for dpkg --get-selections |grep postgres:
postgresql install
postgresql-9.3 install
postgresql-9.4 install
postgresql-client-9.3 install
postgresql-client-9.4 install
postgresql-client-common install
postgresql-common install
postgresql-contrib install
postgresql-contrib-9.3 install
postgresql-contrib-9.4 install
postgresql-server-dev-9.3 install
These are my current clusters from pg_lsclusters:
Ver Cluster Port Status Owner Data directory Log file
9.4 apps 5434 online postgres /var/lib/postgresql/9.4/apps /var/log/postgresql/postgresql-9.4-apps.log
9.4 main 5433 online postgres /var/lib/postgresql/9.4/main /var/log/postgresql/postgresql-9.4-main.log
What can I do to be able to access postgres again? Googling hasn't been much help.