0

I recently started a job as a PostgreSQL DBA and wanted to setup a virtual machine at home similar to what I'll be working with so I can start to play around with the system. I setup a CentOS 7 virtual machine and installed PostgreSQL 12 using the instructions at https://computingforgeeks.com/how-to-install-postgresql-12-on-centos-7/

I appear to have been successful and was able to start up the service with no problem using systemctl start postgresql-12.service, however when I run psql --version I get a response of 9.2.24. yum list postgres* | more does show 9 different entries installed, postgresql*, postgresql11*, and postgresql12*, 3 from each.

How can I ensure that when I run psql it launches the version 12, or is there another way I can get into psql12?

1 Answer 1

0

In typical fashion, I figured it out as soon as I posted. Posting the answer I found in case it helps somebody else, or there's a better way I didn't think of.

Version 12 is available at /usr/pgsql-12/bin/psql so I just created an alias psql12='/usr/pgsql-12/bin/psql' and now I can get into version 12 with that alias.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .