0

I recently wanted to upgrade my Postgres version from 14.2 to 15.

The first thing I did, was delete all postgres related directories:

michael@local var % postgres --version postgres (PostgreSQL) 14.2 michael@local var % pwd /usr/local/var michael@local var % ls cache homebrew mongodb postgres.old postgresql@13 db log postgres postgresql@12 run michael@local var % rm -rf postgres postgres.old postgresql@12 postgresql@13 michael@local var % 

Then, I downloaded Postgres.app from their official website. The app is up and running, everything is working as expected. The installed version seems to be version 15:

SELECT version(); -- PostgreSQL 15.1 on aarch64-apple-darwin21.6.0, compiled by Apple clang version 14.0.0 (clang-1400.0.29.102), 64-bit 

But when I run postgres --version in the terminal, it still returns postgres (PostgreSQL) 14.2.

michael@local var % postgres --version postgres (PostgreSQL) 14.2 

I'm worried I may have missed something.

Is something potentially broken and, if so, how can I fix it?

1
  • I'm not familiar with this version packaged for MacOS, but it sounds like a problem that is fundamentally about setting the PATH environment variable appropriately. It would appear that you have older postgres tooling installed still, which you may or may not want to remove, but regardless you will want to make sure the current postgres is found in PATH. postgresapp.com/documentation/install.html appears to have some guidance. Commented Feb 7, 2023 at 10:43

1 Answer 1

0

I would try

% which postgres 

most likely you have multiple copies installed, and the one that comes first in your PATH is not the one you are looking for. You can check your path with the command

echo $PATH 

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.