Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with re-installation of Postgres.app #690

Closed
Stophface opened this issue Nov 10, 2022 · 4 comments
Closed

Problem with re-installation of Postgres.app #690

Stophface opened this issue Nov 10, 2022 · 4 comments

Comments

@Stophface
Copy link

Stophface commented Nov 10, 2022

I installed Postgres with the Postgres.app a while ago and I want to install a new version of the Postgres.app including pgAdmin. The instructions about uninstalling the old version of Postgres only mention Postgres installed with brew, MacPorts, EnterpriseDB and KyngChaos. So I followed the uninstallation steps given here

Uninstalling Postgres.app

  1. Quit Postgres.app & drag it to the Trash
  2. Delete the data directory (default location: ~/Library/Application Support/Postgres)
  3. Delete preferences for Postgres.app by executing the following command: defaults delete com.postgresapp.Postgres2

Upon initializing the server, I am getting the following message

Required PostgreSQL version not installed
The data directory was initialized with PostgreSQL 14.
This copy of Postgres.app includes the following PostgreSQL versions: 15.
Please try downloading a different release of Postgres.app.

So, I assume my former installation of the Postgres.app included PostgreSQL 14, the new installation comes with PostgreSQL 15. But why doesn't the Postgres.app overwrite the old Postgres version?
What is the way to go here? How can I install the new Postgres version, or even better, how can I remove all traces of Postgres from my system? My OS X is 13.0.

@cappert

This comment was marked as off-topic.

@jakob
Copy link
Member

jakob commented Nov 11, 2022

@Stophface This is odd. If you follow the "Uninstalling Postgres.app" steps 1-3, and then start Postgres.app again, then Postgres.app should create a new, empty data directory with the correct version, and migration should not be necessary.

How did you delete Postgres.app preferences? If you just deleted the preference file in the Finder, it could be that prefsd still cached the old version, you need to use the defaults command to delete preferences.

Also, could you check which version of Postgres.app you are using? Double click Postgres.app, then from the "Postgres" menu select "About Postico" "About Postgres".

@Stophface
Copy link
Author

Stophface commented Nov 15, 2022

@jakob I followed the deinstallation instructions as outlined in my initial question. Now I downloaded now the PostgreSQL 14 one click installer and eveything works...

When I click "About Postgres" (there is no "About Postico"), its version 2.5.10 (160).

@jakob
Copy link
Member

jakob commented Nov 15, 2022

@Stophface To be honest, it sounds like you didn't actually delete the PostgreSQL 14 data directory (step 2). That would explain why Postgres.app with PostgreSQL 15 complains about the data directory being the wrong version, and why it works when you download Posgres.app with PostgreSQL 14.

Did you use rm -rf to delete the data directory? Is it possible you made a typo when deleting the data directory, or forgot to quote the space? That would explain the behavior you are seeing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants